n = gets.to_i
while n>0 do
	s = gets.split(nil)
	a = s[0].to_i
	b = s[1].to_i
	c = s[2].to_i
	
	d = b*b+c*c-a*a
	e = a*a+c*c-b*b
	f = a*a+b*b-c*c
	
	#print(d,e,f,"\n")
	
	flg = 0
	
	if d==0 then
		print("YES\n")
		flg=1
	end
	
	if e==0 then
		print("YES\n")
		flg=1
	end
	
	if f==0 then
		print("YES\n")
		flg=1
	end
	
	if flg==0
		print("NO\n")
	end
	
	n=n-1
end
