
def checkTriangle(i, j, k)

  a = (i ** 2 + j ** 2 == k ** 2)
  b = (i ** 2 + k ** 2 == j ** 2)
  c = (j ** 2 + k ** 2 == i ** 2)

  return a | b | c

end

N = gets.to_i

inputs = Array.new(N) {|x| x = gets.split()}

for a, b, c in inputs
  puts checkTriangle(a.to_i, b.to_i, c.to_i) ? "YES" : "NO"
end