import java.io.*; import java.util.*; import java.math.*; public class Solution { static class Point { int x; int y; public Point(int x, int y) { this.x = x; this.y = y; } } public static boolean check(List list) { int minX = Integer.MAX_VALUE; int maxX = Integer.MIN_VALUE; int minY = Integer.MAX_VALUE; int maxY = Integer.MIN_VALUE; for (Point p : list) { if (p.x > maxX) { maxX = p.x; } if (p.x < minX) { minX = p.x; } if (p.y > maxY) { maxY = p.y; } if (p.y < minY) { minY = p.y; } } for (Point p : list) { if ((p.x >= minX && p.x <= maxX && p.y == maxY) || (p.x >= minX && p.x <= maxX && p.y == minY) || (p.y >= minY && p.y <= maxY && p.x == maxX) || (p.y >= minY && p.y <= maxY && p.x == minX)) { } else { return false; } } return true; } public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner in = new Scanner(System.in); int t = in.nextInt(); while (t > 0) { int n = in.nextInt(); List list = new ArrayList<>(); for (int i=0; i