import java.util.*; class PointsInARectangle { public static void main(String[] args) { Scanner s=new Scanner(System.in); int t=s.nextInt(); while (t--!=0) { int q=s.nextInt(); int[] xArray=new int[q]; int[] yArray=new int[q]; for(int i=0;ixmax)xmax=xArray[i]; if(xArray[i]ymax)ymax=yArray[i]; if(yArray[i]