PON - 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.
t – the number of test cases, then t test cases follows. [t <= 500]
Each line contains one integer: N [2 <= N <= 2^63-1]
For each test case output string "YES" if given number is prime and "NO" otherwise.
Input: 5 2 3 4 5 6 Output: YES YES NO YES NO
Last edit: 2011-02-10 09:51:44