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.
N=int(input())
for n in range(N):
	sides = list(map(int,input().split()))
	sides.sort()
	if sides[-1] < sides[-2]+sides[-3]:
		print("YES")
	else:
		print("NO")
N=int(input())
for n in range(N):
	sides = list(map(int,input().split()))
	sides.sort()
	if sides[-1]**2 == sides[-2]**2 + sides[-3]**2:
		print("YES")
	else:
		print("NO")