#
#
answer = Array.new

times = $stdin.gets.to_i
1.upto( times ){
	line = $stdin.gets
	nums = line.split( /\s/ )
	nums.map!{ |r| r.to_i }
	nums.sort!

	a = nums[ 0 ]  
	b = nums[ 1 ]  
	c = nums[ 2 ]

	if a*a + b*b == c*c
		answer << "YES"
	else
		answer << "NO"
	end
}
answer.each{ |ans|
	puts ans
}
