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