n = input()
for i in range(n):
	a, b, c = map(int, raw_input().strip().split(' '))
	if a*a+b*b == c*c or a*a+c*c == b*b or c*c+b*b == a*a:
		print "YES"
	else:
		print "NO" n = input() n input() input for i in range(n):
	a, b, c = map(int, raw_input().strip().split(' '))
	if a*a+b*b == c*c or a*a+c*c == b*b or c*c+b*b == a*a:
		print "YES"
	else:
		print "NO" i range(n) range n a, b, c = map(int, raw_input().strip().split(' ')) a map(int, raw_input().strip().split(' ')) map int raw_input().strip().split(' ') ().strip().split ().strip() ().strip () raw_input strip split ' ' b c if a*a+b*b == c*c or a*a+c*c == b*b or c*c+b*b == a*a:
		print "YES"
	else:
		print "NO" a*a+b*b == c*c or a*a+c*c == b*b or c*c+b*b == a*a a*a+b*b == c*c or a*a+c*c == b*b a*a+b*b == c*c a*a+b*b a*a a a b*b b b c*c c c a*a+c*c == b*b a*a+c*c a*a a a c*c c c b*b b b c*c+b*b == a*a c*c+b*b c*c c c b*b b b a*a a a print print c = map(int, raw_input().strip().split(' ')) map(int, raw_input().strip().split(' ')) c b, c = map(int, raw_input().strip().split(' ')) map(int, raw_input().strip().split(' ')) b n = input() input() n a, b, c = map(int, raw_input().strip().split(' ')) map(int, raw_input().strip().split(' ')) a
n = input()
for i in range(n):
	a, b, c = map(int, raw_input().strip().split(' '))
	if a*a+b*b == c*c or a*a+c*c == b*b or c*c+b*b == a*a:
		print "YES"
	else:
		print "NO"