#include #include #include #include #include using namespace std; int main() { int q; cin>>q; while(q--) { int len,c; cin>>len>>c; if(c>(len*(len-1)/2)) cout<<"-1\n"; } /* Enter your code here. Read input from STDIN. Print output to STDOUT */ return 0; }