file = open("dataset.txt")
i = file.gets.to_i
i.times do
		array = file.gets.split(/\s/)
		array[0] = array[0].to_i
		array[1] = array[1].to_i 
		array[2] = array[2].to_i
		if (array[0]^2 + array[1]^2 == array[2]) || (array[0]^2 + array[2]^2 == array[1]^2) || (array[0]^2 == array[1]^2 + array[2]^2)
				puts("YES")
		else
				puts("NO")
		end
end
file.close