def triangle? a, b, c
  ((a ** 2) + (b ** 2)) == (c ** 2)
end

count = STDIN.gets.chomp.to_i
count.times do |i|
  (a,b,c) = STDIN.gets.chomp.split(" ").map(&:to_i).sort
  output = triangle?(a, b, c) ? 'YES' : 'NO'
  puts output
end