n = gets.chomp.to_i
ans = Array.new(n,0)
for i in 0..n-1 do
	arr = []
	arr = gets.chomp.split.map(&:to_i)
	arr.sort!
	if arr[2]**2 == arr[0]**2 + arr[1]**2
		ans[i] += 1
	end
end
for i in 0..n-1 do
	if ans[i] == 1
		puts "YES"
	else
		puts "NO"
	end
end