import java.util.*; import java.math.*; public class Hack42_2 { static Scanner sc = new Scanner(System.in); static int mod = 1000000007; public static void main(String[] args) { int q = ni(); TCLOOP: while(q-->0) { int n = ni(); int[] x = new int[n]; int[] y = new int[n]; for(int i=0;i