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:
t=input()
assert(raw_input()=="")
assert(t<=500)
while t:
	t-=1
	n=input()
	i=2
	flag="YES"
	if (n==0 or n==1):
		flag="NO"
	while i*i<=n:
		if n%i==0:
			flag="NO"
			break
		i+=1
	print flag