numberOfDataSets = 0
sideLengthList = []

while 1:
	try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

			if numberOfDataSets != 0 :
				sideLengthList = []

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)
 
		if numberOfDataSets == 0 :
			# Is it a right triangle?
			for i in range(0, len(sideLengthList)) :

				a = int(sideLengthList[i][0])*int(sideLengthList[i][0])
				b = int(sideLengthList[i][1])*int(sideLengthList[i][1])
				c = int(sideLengthList[i][2])*int(sideLengthList[i][2])

				if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	except:
		break numberOfDataSets = 0 numberOfDataSets 0 sideLengthList = [] sideLengthList [] while 1:
	try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

			if numberOfDataSets != 0 :
				sideLengthList = []

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)
 
		if numberOfDataSets == 0 :
			# Is it a right triangle?
			for i in range(0, len(sideLengthList)) :

				a = int(sideLengthList[i][0])*int(sideLengthList[i][0])
				b = int(sideLengthList[i][1])*int(sideLengthList[i][1])
				c = int(sideLengthList[i][2])*int(sideLengthList[i][2])

				if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	except:
		break 1 try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

			if numberOfDataSets != 0 :
				sideLengthList = []

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)
 
		if numberOfDataSets == 0 :
			# Is it a right triangle?
			for i in range(0, len(sideLengthList)) :

				a = int(sideLengthList[i][0])*int(sideLengthList[i][0])
				b = int(sideLengthList[i][1])*int(sideLengthList[i][1])
				c = int(sideLengthList[i][2])*int(sideLengthList[i][2])

				if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	except:
		break except:
		break break data = raw_input().split() data raw_input().split() ().split () raw_input split if len(data) == 1 :
			numberOfDataSets = int(data[0])

			if numberOfDataSets != 0 :
				sideLengthList = []

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)
 
		 len(data) == 1 len(data) len data 1 numberOfDataSets = int(data[0]) numberOfDataSets int(data[0]) int data[0] data 0 if numberOfDataSets != 0 :
				sideLengthList = []

		 numberOfDataSets != 0 numberOfDataSets 0 sideLengthList = [] sideLengthList [] elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)
 
		 len(data) == 3 and numberOfDataSets != 0 len(data) == 3 len(data) len data 3 numberOfDataSets != 0 numberOfDataSets 0 numberOfDataSets -= 1 numberOfDataSets 1 sideLengthList.append(data) sideLengthList.append sideLengthList append data if numberOfDataSets == 0 :
			# Is it a right triangle?
			for i in range(0, len(sideLengthList)) :

				a = int(sideLengthList[i][0])*int(sideLengthList[i][0])
				b = int(sideLengthList[i][1])*int(sideLengthList[i][1])
				c = int(sideLengthList[i][2])*int(sideLengthList[i][2])

				if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	 numberOfDataSets == 0 numberOfDataSets 0 for i in range(0, len(sideLengthList)) :

				a = int(sideLengthList[i][0])*int(sideLengthList[i][0])
				b = int(sideLengthList[i][1])*int(sideLengthList[i][1])
				c = int(sideLengthList[i][2])*int(sideLengthList[i][2])

				if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	 i range(0, len(sideLengthList)) range 0 len(sideLengthList) len sideLengthList a = int(sideLengthList[i][0])*int(sideLengthList[i][0]) a int(sideLengthList[i][0])*int(sideLengthList[i][0]) int(sideLengthList[i][0]) int sideLengthList[i][0] [i] sideLengthList i 0 int(sideLengthList[i][0]) int sideLengthList[i][0] [i] sideLengthList i 0 b = int(sideLengthList[i][1])*int(sideLengthList[i][1]) b int(sideLengthList[i][1])*int(sideLengthList[i][1]) int(sideLengthList[i][1]) int sideLengthList[i][1] [i] sideLengthList i 1 int(sideLengthList[i][1]) int sideLengthList[i][1] [i] sideLengthList i 1 c = int(sideLengthList[i][2])*int(sideLengthList[i][2]) c int(sideLengthList[i][2])*int(sideLengthList[i][2]) int(sideLengthList[i][2]) int sideLengthList[i][2] [i] sideLengthList i 2 int(sideLengthList[i][2]) int sideLengthList[i][2] [i] sideLengthList i 2 if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	 a + b == c or b + c == a or c + a == b a + b == c or b + c == a a + b == c a + b a b c b + c == a b + c b c a c + a == b c + a c a b print print a = int(sideLengthList[i][0])*int(sideLengthList[i][0]) int(sideLengthList[i][0])*int(sideLengthList[i][0]) a b = int(sideLengthList[i][1])*int(sideLengthList[i][1]) int(sideLengthList[i][1])*int(sideLengthList[i][1]) b sideLengthList = [] [] sideLengthList numberOfDataSets = 0 0 numberOfDataSets c = int(sideLengthList[i][2])*int(sideLengthList[i][2]) int(sideLengthList[i][2])*int(sideLengthList[i][2]) c data = raw_input().split() raw_input().split() data numberOfDataSets = int(data[0]) int(data[0]) numberOfDataSets numberOfDataSets -= 1 1 numberOfDataSets sideLengthList = [] [] sideLengthList
numberOfDataSets = 0
sideLengthList = []

while 1:
	try:
		data = raw_input().split()

		if len(data) == 1 :
			numberOfDataSets = int(data[0])

			if numberOfDataSets != 0 :
				sideLengthList = []

		elif len(data) == 3 and numberOfDataSets != 0:
			numberOfDataSets -= 1
			sideLengthList.append(data)
 
		if numberOfDataSets == 0 :
			# Is it a right triangle?
			for i in range(0, len(sideLengthList)) :

				a = int(sideLengthList[i][0])*int(sideLengthList[i][0])
				b = int(sideLengthList[i][1])*int(sideLengthList[i][1])
				c = int(sideLengthList[i][2])*int(sideLengthList[i][2])

				if a + b == c or b + c == a or c + a == b :
					print"YES"
				else:
					print"NO"

	except:
		break