n = gets.chomp.to_i
data = []
for i in 1..(n)
  data = gets.chomp.split(" ")
  data[0] = data[0].to_i
  data[1] = data[1].to_i
  data[2] = data[2].to_i
  data = data.sort
  if data[0] * data[0] + data[1] * data[1] == data[2] * data[2]
    puts("YES")
  else
    puts("NO")
  end
end
