def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
	main() def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list) main n = int(input()) n int(input()) int input() input for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list) _ range(n) range n len_list = map(int, input().split()) len_list map(int, input().split()) map int input().split() ().split () input split check_tri(len_list) check_tri len_list def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO') check_tri import itertools itertools import math math flag = False flag False for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	 tmp list(itertools.permutations(len_list)) list itertools.permutations(len_list) itertools.permutations itertools permutations len_list if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	 (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2) pow(tmp[0], 2) + pow(tmp[1], 2) pow(tmp[0], 2) pow tmp[0] tmp 0 2 pow(tmp[1], 2) pow tmp[1] tmp 1 2 pow(tmp[2], 2) pow tmp[2] tmp 2 2 flag = True flag True break if flag == True:
		print('YES')
	else:
		print('NO') flag == True flag True print('YES') print 'YES' print('NO') print 'NO' len_list len_list if __name__ == '__main__':
	main() __name__ == '__main__' __name__ '__main__' main() main def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO') def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO') check_tri def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list) def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list) main
def main():
	n = int(input())

	for _ in range(n):
		len_list = map(int, input().split())
		check_tri(len_list)

def check_tri(len_list):
	import itertools
	import math

	flag = False
	for tmp in list(itertools.permutations(len_list)):
		if (pow(tmp[0], 2) + pow(tmp[1], 2)) == pow(tmp[2], 2):
			flag = True
			break

	if flag == True:
		print('YES')
	else:
		print('NO')

if __name__ == '__main__':
	main()