class Integer
  def square
    return self ** 2
  end
end

judge = ->(ary) {
  if ary.last.square == ary[0].square + ary[1].square
    puts "YES"
    break
  else
    puts "NO"
  end
}

n = gets.to_i

n.times do |i|
  ary = gets.split(" ").map(&:to_i).sort
  judge.call(ary)
end