t = readline().to_i for i in 1..t do a = readline().to_i if a == 0 || a == 45 puts 'Y' else puts 'N' end end