N=gets.to_i
N.times do
  lengths =  gets().split().map(&:to_i).to_a
  hypotenuse = lengths.max
  others = lengths - [hypotenuse]
  if (hypotenuse**2) == others[0]**2 + others[1]**2
    puts "YES"
  else
    puts "NO"
  end
end