num = []
i=0
roop = gets.to_i
while i<roop
      a = gets
      num = a.split(nil)
      num.sort!

      if (num[2].to_i**2) == ((num[1].to_i**2)+(num[0].t\
o_i**2))
         puts "YES"
      else
        puts "NO"
      end

      i+=1
end