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