n = gets.chomp.to_i
ln = []

def sqpls(i, j)
  num = i * i + j * j
  return num
end

n.times do |i|
  ln[i] = gets.chomp.split
  3.times do |j|
    ln[i][j] = ln[i][j].to_i
  end
end

n.times do |i|
  if sqpls(ln[i][0], ln[i][1]) == sqpls(ln[i][2], 0) ||
     sqpls(ln[i][1], ln[i][2]) == sqpls(ln[i][0], 0) ||
     sqpls(ln[i][2], ln[i][0]) == sqpls(ln[i][1], 0)
    puts "YES"
  else
    puts "NO"
  end
end
