def check_right_triangle(side1, side2, side3):
	pow = 2
	if side1**pow == side2**pow + side3**pow:
		return True
	if side2**pow == side3**pow + side1**pow:
		return True
	if side3**pow == side1**pow + side2**pow:
		return True
	return False


def check():
	for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO"



if __name__ == "__main__":
	check()
	# print check_right_triangle(4, 3, 5)
	# print check_right_triangle(4, 3, 6)
	# print check_right_triangle(8, 8, 8) def check_right_triangle(side1, side2, side3):
	pow = 2
	if side1**pow == side2**pow + side3**pow:
		return True
	if side2**pow == side3**pow + side1**pow:
		return True
	if side3**pow == side1**pow + side2**pow:
		return True
	return False check_right_triangle pow = 2 pow 2 if side1**pow == side2**pow + side3**pow:
		return True
	 side1**pow == side2**pow + side3**pow side1**pow side1 pow side2**pow + side3**pow side2**pow side2 pow side3**pow side3 pow return True True if side2**pow == side3**pow + side1**pow:
		return True
	 side2**pow == side3**pow + side1**pow side2**pow side2 pow side3**pow + side1**pow side3**pow side3 pow side1**pow side1 pow return True True if side3**pow == side1**pow + side2**pow:
		return True
	 side3**pow == side1**pow + side2**pow side3**pow side3 pow side1**pow + side2**pow side1**pow side1 pow side2**pow side2 pow return True True return False False side1 side1 side2 side2 side3 side3 def check():
	for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO" check for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO" i range(int(raw_input())) range int(raw_input()) int raw_input() raw_input sides = map(int, raw_input().split()) sides map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO" check_right_triangle(sides[0], sides[1], sides[2]) check_right_triangle sides[0] sides 0 sides[1] sides 1 sides[2] sides 2 print print if __name__ == "__main__":
	check()
	# print check_right_triangle(4, 3, 5)
	# print check_right_triangle(4, 3, 6)
	# print check_right_triangle(8, 8, 8) __name__ == "__main__" __name__ "__main__" check() check def check():
	for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO" def check():
	for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO" check def check_right_triangle(side1, side2, side3):
	pow = 2
	if side1**pow == side2**pow + side3**pow:
		return True
	if side2**pow == side3**pow + side1**pow:
		return True
	if side3**pow == side1**pow + side2**pow:
		return True
	return False def check_right_triangle(side1, side2, side3):
	pow = 2
	if side1**pow == side2**pow + side3**pow:
		return True
	if side2**pow == side3**pow + side1**pow:
		return True
	if side3**pow == side1**pow + side2**pow:
		return True
	return False check_right_triangle
def check_right_triangle(side1, side2, side3):
	pow = 2
	if side1**pow == side2**pow + side3**pow:
		return True
	if side2**pow == side3**pow + side1**pow:
		return True
	if side3**pow == side1**pow + side2**pow:
		return True
	return False


def check():
	for i in range(int(raw_input())):
		sides = map(int, raw_input().split())
		if check_right_triangle(sides[0], sides[1], sides[2]):
			print "YES"
		else:
			print "NO"



if __name__ == "__main__":
	check()
	# print check_right_triangle(4, 3, 5)
	# print check_right_triangle(4, 3, 6)
	# print check_right_triangle(8, 8, 8)