Primality Test

No attempts yetTime limit1sMemory limit128 MB

Problem

An integer PP greater than 1 is a prime number when it has no positive divisor other than 1 and PP itself. The numbers 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31 are all prime. A natural number that is at least 2 and is not prime, such as 4, 6, or 16, is a composite number. The number 1 is neither prime nor composite.

Decide whether a given natural number NN is prime.

Input

Read from standard input. The first line contains the number of test cases TT. Each of the next TT lines contains one natural number NN to test. The bounds are 1T101 \le T \le 10 and 1N1081 \le N \le 10^8.

Output

Write to standard output. For each test case print one line: YES when NN is prime, NO when it is not. There are TT test cases, so the program prints TT lines in total.