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