# -*- config: utf-8 -*-
if __name__ == '__main__':
	for i in range(int(raw_input())):
		nums = map(lambda x:x**2,map(int,raw_input().split()))
		flg = False
		for i in range(3):
			s = int(0)
			for j in range(3):
				if i == j :
					continue
				s += nums[j]
			if s == nums[i] :
				flg = True

		if flg == True :
			print "YES"
		else :
			print "NO" if __name__ == '__main__':
	for i in range(int(raw_input())):
		nums = map(lambda x:x**2,map(int,raw_input().split()))
		flg = False
		for i in range(3):
			s = int(0)
			for j in range(3):
				if i == j :
					continue
				s += nums[j]
			if s == nums[i] :
				flg = True

		if flg == True :
			print "YES"
		else :
			print "NO" __name__ == '__main__' __name__ '__main__' for i in range(int(raw_input())):
		nums = map(lambda x:x**2,map(int,raw_input().split()))
		flg = False
		for i in range(3):
			s = int(0)
			for j in range(3):
				if i == j :
					continue
				s += nums[j]
			if s == nums[i] :
				flg = True

		if flg == True :
			print "YES"
		else :
			print "NO" i range(int(raw_input())) range int(raw_input()) int raw_input() raw_input nums = map(lambda x:x**2,map(int,raw_input().split())) nums map(lambda x:x**2,map(int,raw_input().split())) map lambda x:x**2 x**2 x 2 x map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split flg = False flg False for i in range(3):
			s = int(0)
			for j in range(3):
				if i == j :
					continue
				s += nums[j]
			if s == nums[i] :
				flg = True

		 i range(3) range 3 s = int(0) s int(0) int 0 for j in range(3):
				if i == j :
					continue
				s += nums[j]
			 j range(3) range 3 if i == j :
					continue
				 i == j i j continue s += nums[j] s nums[j] nums j if s == nums[i] :
				flg = True

		 s == nums[i] s nums[i] nums i flg = True flg True if flg == True :
			print "YES"
		else :
			print "NO" flg == True flg True print print flg = False False flg s = int(0) int(0) s flg = True True flg nums = map(lambda x:x**2,map(int,raw_input().split())) map(lambda x:x**2,map(int,raw_input().split())) nums s += nums[j] nums[j] s
# -*- config: utf-8 -*-
if __name__ == '__main__':
	for i in range(int(raw_input())):
		nums = map(lambda x:x**2,map(int,raw_input().split()))
		flg = False
		for i in range(3):
			s = int(0)
			for j in range(3):
				if i == j :
					continue
				s += nums[j]
			if s == nums[i] :
				flg = True

		if flg == True :
			print "YES"
		else :
			print "NO"