#PON. Prime or Not

    ID: 194 远端评测题 21000ms 1536MiB 尝试: 0 已通过: 0 难度: (无) 上传者: 标签>cryptographyprime-numbers-1primality-test

Prime or Not

Given the number, you are to answer the question: "Is it prime?"

Solutions to this problem can be submitted in C, C++, Pascal, Perl, Python, Ruby, Lisp, Hask, Ocaml, Prolog, Whitespace, Brainf**k and Intercal only.

Input

t – the number of test cases, then t test cases follows. [t <= 500]
Each line contains one integer: N [2 <= N <= 2^63-1]

Output

For each test case output string "YES" if given number is prime and "NO" otherwise.

Example

Input:
5
2
3
4
5
6

Output: YES YES NO YES NO

</p>