T = int(input()) for i in range(T): A = int(input()) if A == 0 or A == 45: print("Y") else: print("N")