from sys import stdin input = stdin.readline for _ in range(int(input())): X = int(input()) print("Y" if X in [0, 45] else "N")