T = int(input()) x = [] for i in range(T): x.append(int(input())) for i in x: if i in [0, 45]: print("Y") else: print("N")