def d(a):
	return int(a)

N=int(input())
answer=""
for i in range(N):
	if answer!="":
		answer+="\n"
	a=input().split()
	
	a.sort(key=d)
	if int(a[0])**2+int(a[1])**2==int(a[2])**2:
		answer+="YES"
	else:
		answer+="NO"
print(answer) def d(a):
	return int(a) d return int(a) int(a) int a a a N=int(input()) N int(input()) int input() input answer="" answer "" for i in range(N):
	if answer!="":
		answer+="\n"
	a=input().split()
	
	a.sort(key=d)
	if int(a[0])**2+int(a[1])**2==int(a[2])**2:
		answer+="YES"
	else:
		answer+="NO" i range(N) range N if answer!="":
		answer+="\n"
	 answer!="" answer "" answer+="\n" answer "\n" a=input().split() a input().split() ().split () input split a.sort(key=d) a.sort a sort key=d key d if int(a[0])**2+int(a[1])**2==int(a[2])**2:
		answer+="YES"
	else:
		answer+="NO" int(a[0])**2+int(a[1])**2==int(a[2])**2 int(a[0])**2+int(a[1])**2 int(a[0])**2 int(a[0]) int a[0] a 0 2 int(a[1])**2 int(a[1]) int a[1] a 1 2 int(a[2])**2 int(a[2]) int a[2] a 2 2 answer+="YES" answer "YES" answer+="NO" answer "NO" print(answer) print answer answer+="YES" "YES" answer a=input().split() input().split() a N=int(input()) int(input()) N answer="" "" answer answer+="\n" "\n" answer def d(a):
	return int(a) def d(a):
	return int(a) d answer+="NO" "NO" answer
def d(a):
	return int(a)

N=int(input())
answer=""
for i in range(N):
	if answer!="":
		answer+="\n"
	a=input().split()
	
	a.sort(key=d)
	if int(a[0])**2+int(a[1])**2==int(a[2])**2:
		answer+="YES"
	else:
		answer+="NO"
print(answer)