n=int(input())
list1=[]

for i in range(n):
    list1.append(int(input()))
for i in list1:
    flag = True
    for j in range(2,i):
        if i%j==0:
            flag=False
            print('false')
            break
    if flag==True:
        print('true')