n = gets.to_i
for i in 1..n do
	a,b,c = gets.chomp!.split(" ").map(&:to_i)
	if a < b then
		temp = a
		a = b
		b = temp
	end
	if a < c then
		temp = a
		a = c
		c = temp
	end
	if b < c then
		temp = b
		b = c
		c = temp
	end

	if (a ** 2) == ((b**2) + (c**2)) then
		puts "YES\n"
	else
		puts "NO\n"
	end
end