class Triangle
  def initialize(array)
    @lengths = array.sort!
  end

  attr_accessor :lengths

  def right_triangle?
    (@lengths[0] ** 2) + (@lengths[1] ** 2) == @lengths[2] ** 2
  end
end

case_num = gets.to_i
case_num.times do
  puts Triangle.new(gets.split(" ").map(&:to_i)).right_triangle? ? "YES" : "NO"
end