size = gets.to_i
size.times do
  sides = STDIN.readline.split(" ").map(&:to_i)
  long = sides.max
  sides.each_with_index do |v, i|
    if v == long
      sides.delete_at(i)
      break
    end
  end

  if long**2 == sides[0]**2 + sides[1]**2
    puts "YES"
  else
    puts "NO"
  end
end