import java.io.*; import java.util.*; public final class hack_b { static BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); static FastScanner sc=new FastScanner(br); static PrintWriter out=new PrintWriter(System.out); public static void main(String args[]) throws Exception { int t=sc.nextInt(); while(t>0) { int n=sc.nextInt();Pair[] a=new Pair[n];int min_x=Integer.MAX_VALUE,min_y=Integer.MAX_VALUE,max_x=Integer.MIN_VALUE,max_y=Integer.MIN_VALUE; for(int i=0;i