count = STDIN.gets.chomp.to_i

while count != 0
	sannpenn = STDIN.gets.chomp.split("\s")
	sannpenn.map!{|item| item.to_i}
	sannpenn.sort!
	count += -1
	if (sannpenn[0]**2 + sannpenn[1]**2) == sannpenn[2]**2
		puts "YES"
		else
		puts "NO"
	end

end