T = gets.to_i T.times do x = gets.to_i if x == 0 || x == 45 puts 'Y' else puts 'N' end end