def is_right_triangle(a, b, c)
  (a*a == b*b + c*c) || (b*b == a*a + c*c) || (c*c == a*a + b*b)
end

n = STDIN.gets

while line = STDIN.gets
  line.chomp!
  arr = line.split(" ")
  if is_right_triangle(arr[0].to_i, arr[1].to_i, arr[2].to_i)
    puts "YES"
  else
    puts "NO"
  end
end