num = gets

threeLines = Array.new

num.to_i.times do
  threeLines.push(gets)
end

num.to_i.times do |cnt|
  lineArray = threeLines[cnt].split(" ")

  lineArray.sort!
  lineArray.reverse!

  if(lineArray[0].to_i**2 == lineArray[1].to_i**2 + lineArray[2].to_i**2)
    puts "YES"
  else
    puts "NO"
  end
end