Problem: Mr. Retardo has lost his marbles. He's a professor, and absolutely loathes his students. And since going full retard, he asks them all sorts of useless questions. His latest obsession is prime numbers, and he gives all his a students random number n and asks them to check if it is prime. 
Check if it is!!

Note that the permitted language list for this problem has been altered. Please check before solving.

EDIT

Maximum number of test cases - 500,
0 ≤ n ≤ 5*10^9

SAMPLE INPUT
5

2
3
4
5
6

SAMPLE OUTPUT
YES
YES
NO
YES
NO

Solution (in PYTHON):

Solution:
def isprime(number):
 if number==1:
  return 0
 if number==2:
  return 1
 if number%2==0:
  return 0
 N=number**0.5
 i=3
 while i<=N:
  if number%i==0:
   return 0
  i=i+2
 return 1

def main():
 t=input()
 s=raw_input()
 while t:
  number=long(raw_input())
  if isprime(number):
   print "YES"
  else:
   print "NO"
  t=t-1 
main()