#include #include #include #include #include using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int q, n; cin>>q; while(q--) { cin>>n; int i=0, maxx=-10001, maxy=-10001, minx=10001, miny=10001; vector>p(n); while(i>x>>y; p[i]=make_pair(x, y); if(x>maxx) maxx=x; if(xmaxy) maxy=y; if(yminx&&p[i].second>miny&&p[i].second