def f(n):  # 判断 n 是否为素数
    if n == 2:
        return 'true'

    for i in range(2,n):
        if n % i == 0:
            return 'false'

    return 'true'


times = int(input() )

for i in range(times):
    n = int(input())
    print(f(n))