n = gets.chomp.to_i

n.times do
  line = gets
  numbers = line.split(nil).map(&:to_i)
  if (numbers[0]**2 + numbers[1]**2 == numbers[2]**2)||(numbers[1]**2 + numbers[2]**2 == numbers[0]**2)||(numbers[2]**2 + numbers[0]**2 == numbers[1]**2)
    puts "YES"
  else
    puts "NO"
  end
end
