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