date_set = gets.chomp.to_f
date_count = 0

loop  do
  break if date_count == date_set
  (a,b,c) = gets.chomp.split.map(&:to_f).sort
  if c.to_f ** 2 == a.to_f ** 2 + b.to_f ** 2
    puts "YES"
  else
    puts  "NO"
  end
  date_count += 1
end
