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