cnt = gets.to_i
results = []
cnt.times do 
  a, b, c = gets.split(" ").map(&:to_i)
  results << (Math.hypot(a, b) == c or Math.hypot(b, c) == a or Math.hypot(c, a) == b ? "YES" : "NO")
end
puts results