def divide_2(n): for i in range(10**5): n = n/2 if n > 1: continue elif n == 1: return 1 break else: return 0 break T = int(input()) for i in range(T): x = int(input()) if divide_2(x) == 1: print("Y") else: print("N")