Write a program which judges wheather given length of three side form a right triangle. Print "YES" if the given sides (integers) form a right triangle, "NO" if not so.
num=int(input())

for i in range(num):
		a,b,c=input().split(" ")
		if(a==b==c):
			print("YES")
		else:	
			print("NO")
num=int(input())

for i in range(num):
	a=list(map(int,input().split(" ")))
	a.sort()
	if(a[0]**2+a[1]**2==a[2]**2):
		print("YES")
	else:	
		print("NO")