STDIN.to_a[1..-1].each do |value|
	value =~ /^(\d+) (\d+) (\d+)$/
	array = [$1.to_i, $2.to_i, $3.to_i]
	array.sort!
	if ((array[0]**2 + array[1]**2) == array[2]**2)
		puts "YES"
	else
		puts "NO"
	end
end