import java.util.Scanner; public class Main{ public static void main(String[] args){ Scanner scanner = new Scanner(System.in); int count = scanner.nextInt(); int[] nums = new int[count]; for(int index = 0; index < count; index++){ nums[index] = scanner.nextInt(); } for(int index = 0; index < count; index++){ if(check(nums[index])){ System.out.println("true"); }else{ System.out.println("false"); } } } private static boolean check(int num){ if (num < 2) { return false; } for (int index = 2; index <= num / index; index++ ) { if (num % index == 0) { return false; } } return true; } }