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