#include #include #include #include #include using namespace std; struct q{ int x; int y; }; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n,q,xmin,xmax,ymin,ymax,i; cin>>q; while(q--){ int flag=0; cin>>n; struct q a[n]; for(i=0;i>a[i].x>>a[i].y; xmin=a[0].x; xmax=a[0].x; ymin=a[0].y; ymax=a[0].y; for(i=1;ia[i].x) xmin=a[i].x; if(xmaxa[i].y) ymin=a[i].y; if(ymax