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