num = []
i=0
roop = gets.to_i

while i<roop
      a = gets
      num = []
      num = a.split(nil)
      num = num.map{ |n| n.to_i}
      num.sort!

      if (num[2]**2) == ((num[1]**2)+(num[0]**2))
         puts "YES"
      else
        puts "NO"
      end

      i+=1
end