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