arr = Array.new
numberOflines = gets.to_i
numberOflines.times do
   arr << gets
end

arr.each do |i|
   a = i.split(" ")
   a.map!{|j| j.to_i}
   a.sort!
   if a[0] ** 2 + a[1] ** 2 == a[2] ** 2
      puts "YES"
   else
      puts "NO"
   end
end