class TriangleChecker
  def initialize
    @triangles = []
  end

  # add Triangle Data
  def add(triangle)
    @triangles << triangle
  end

  # check added Triangle
  def check

    @triangles.each {|triangle|

      # sort Triangle Data
      triangle.Line.sort!

      puts ((triangle.Line[0] ** 2) + (triangle.Line[1] ** 2) == (triangle.Line[2] ** 2)) ? "YES" : "NO"
    }
  end
end

# Rectangle Data Class
class Triangle
  attr_accessor :Line
end


inputs = gets.chomp.split(nil)
dataCount = inputs[0].to_i
checker = TriangleChecker.new

dataCount.times {|i|
  inputs = gets.chomp.split(nil)
  line = inputs.map(&:to_i)

  triangle = Triangle.new
  triangle.Line = line

  checker.add(triangle)
}

checker.check