t,*x = [int(i) for i in open(0).read().split()] for i in x: if i in [0,45]: print("Y") else: print("N")