LogiQuest

22. Is It Prime?

EasyMathPrimes

For each query number, print YES if it is prime, otherwise NO.

Input format

Line 1: q Next q lines: an integer n

Output format

q lines of YES or NO.

Example 1

Input

3
2
15
17

Output

YES
NO
YES

Example 2

Input

4
1
97
100
999983

Output

NO
YES
NO
YES

Constraints

1 ≤ q ≤ 100, 1 ≤ n ≤ 10¹²

Read input from standard input and print the answer to standard output. Your code is judged against 3 test cases, most of them hidden.

Loading the MyLoginn IDE…