N=gets.to_i
N.times do
  length_list =  gets().split().map(&:to_i).to_a

  hypotenuse = length_list.max

  cathetus_list = length_list - [hypotenuse]
  cathetus_list_size = cathetus_list.size
  if cathetus_list_size != 2 || !cathetus_list.kind_of?(Array)
    puts "NO"
  elsif (hypotenuse**2) == (cathetus_list[0]**2 + cathetus_list[1]**2)
    puts "YES"
  else
    puts "NO"
  end
end