#encoding:utf-8 No.0003 2014.9.29
num_of_data = gets.chomp
data = Array.new(num_of_data.to_i)

num_of_data.to_i.times do |i|
 each_sides = gets.split

 each_sides.length.times do |j|
  each_sides[j] = each_sides[j].to_i
 end

 data[i] = each_sides.sort
end

num_of_data.to_i.times do |i|
 if data[i][0] ** 2 + data[i][1] ** 2 == data[i][2] **2
  puts "YES"
 else
  puts "NO"
 end
end