T = int(input()) for _ in range(T): x = int(input()) print("Y" if x in {0, 45} else "N")