import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { 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 scan = new Scanner(System.in); int q = scan.nextInt(); for (int query = 0; query < q; query++) { int n = scan.nextInt(); int x[] = new int[n]; int y[] = new int[n]; for (int i = 0; i < n; i++) { x[i] = scan.nextInt(); y[i] = scan.nextInt(); } // boolean output = true; HashMap map = new HashMap(); for (int i = 0; i < n; i++) { for (int j = i+1; j < n; j++) { double lengthx = Math.abs(x[j]-x[i]) * Math.abs(x[j]-x[i]); double lengthy = Math.abs(y[j]-y[i]) * Math.abs(y[j]-y[i]); double length = Math.sqrt(lengthx + lengthy); if (length == 0) { output = false; break; } if (map.containsKey(length)) { int val = map.get(length); if (val == 2) { output = false; break; } else { map.put(length,val+1); } } else { map.put(length,1); } } if (!output) break; } System.out.println(output ? "YES" : "NO"); } } }