num = gets().to_i

judges = Array.new
num.times do
  sides = gets().split().map{|x| x.to_i}
  sides.sort!

  if (sides[0]*sides[0] + sides[1] * sides[1] == sides[2] * sides [2]) then
    judges.push("YES")
  else
    judges.push("NO")
  end
end

num.times do |n|
  puts judges[n]
end