public static void main(String[] args) {
		
		Scanner in = new Scanner(System.in);
		
		int testCases = in.nextInt();
		
		while (testCases > 0) {
			long n = Long.parseLong(in.next());
			
			if (isFibo(n)) {
				System.out.println(IS);
			} else {
				System.out.println(IS_NOT);
			}
			testCases--;
		}
		
	}