import java.io.*; import java.util.*; import java.util.Arrays; public class Solution { public static void main(String[] args) { Scanner in=new Scanner(System.in); int a[]=new int[10001]; int b[]=new int[10001]; int q=in.nextInt(); while(q-->0) { int n=in.nextInt(); int x[]=new int[n]; int y[]=new int[n]; if(n<=2) { System.out.println("YES"); }else{ int count=0; for(int i=0;i