n = gets.chomp.to_i
n.times do |i|
	a = gets
	break if a == nil
	b = a.split(" ")
	b.map! {|item| item.to_i}
	b.sort!
	if (b[2] ** 2) == (b[1] ** 2) + (b[0] ** 2) then
		puts "YES"
	else
		puts "NO"
	end
end	