def my_func(i):
	return i*i
raw_input()
while True:
	try:
		splited = map(int, raw_input().split())
		sort_num = sorted(splited)
		if my_func(sort_num[0])+my_func(sort_num[1]) == my_func(sort_num[2]):
			print 'YES'
		else:
			print 'NO'
	except EOFError:
		break def my_func(i):
	return i*i my_func return i*i i*i i i i i raw_input() raw_input while True:
	try:
		splited = map(int, raw_input().split())
		sort_num = sorted(splited)
		if my_func(sort_num[0])+my_func(sort_num[1]) == my_func(sort_num[2]):
			print 'YES'
		else:
			print 'NO'
	except EOFError:
		break True try:
		splited = map(int, raw_input().split())
		sort_num = sorted(splited)
		if my_func(sort_num[0])+my_func(sort_num[1]) == my_func(sort_num[2]):
			print 'YES'
		else:
			print 'NO'
	except EOFError:
		break except EOFError:
		break break splited = map(int, raw_input().split()) splited map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split sort_num = sorted(splited) sort_num sorted(splited) sorted splited if my_func(sort_num[0])+my_func(sort_num[1]) == my_func(sort_num[2]):
			print 'YES'
		else:
			print 'NO'
	 my_func(sort_num[0])+my_func(sort_num[1]) == my_func(sort_num[2]) my_func(sort_num[0])+my_func(sort_num[1]) my_func(sort_num[0]) my_func sort_num[0] sort_num 0 my_func(sort_num[1]) my_func sort_num[1] sort_num 1 my_func(sort_num[2]) my_func sort_num[2] sort_num 2 print print def my_func(i):
	return i*i def my_func(i):
	return i*i my_func sort_num = sorted(splited) sorted(splited) sort_num splited = map(int, raw_input().split()) map(int, raw_input().split()) splited
def my_func(i):
	return i*i
raw_input()
while True:
	try:
		splited = map(int, raw_input().split())
		sort_num = sorted(splited)
		if my_func(sort_num[0])+my_func(sort_num[1]) == my_func(sort_num[2]):
			print 'YES'
		else:
			print 'NO'
	except EOFError:
		break