T = gets.to_i T.times do h, w, d = gets.split.map(&:to_i) e = h ** 2 + w ** 2 if e <= d ** 2 puts 'N' elsif h <= d && h > 1 puts 'N' elsif w <= d && w > 1 puts 'N' else puts 'S' end end