#include using namespace std; int main(){ int q; cin >> q; for(int a0 = 0; a0 < q; a0++){ int len; int c; cin >> len >> c; // your code goes here int limit = ((len - 1) * (len -2)) / 2; if (c > limit) { cout << -1 << endl; break; } } return 0; }