line = int(input())
for i in range(line):
	a,b,c = sorted([int(i) for i in input().split(' ')])

	if a**2 + b**2 == c**2:
		print('YES')
	else:
		print('NO') line = int(input()) line int(input()) int input() input for i in range(line):
	a,b,c = sorted([int(i) for i in input().split(' ')])

	if a**2 + b**2 == c**2:
		print('YES')
	else:
		print('NO') i range(line) range line int(i) for i in input().split(' ') for i in input().split(' ') i input().split(' ') ().split () input split ' ' for i in input().split(' ') int(i) int i a,b,c = sorted([int(i) for i in input().split(' ')]) a sorted([int(i) for i in input().split(' ')]) sorted [int(i) for i in input().split(' ')] b c if a**2 + b**2 == c**2:
		print('YES')
	else:
		print('NO') a**2 + b**2 == c**2 a**2 + b**2 a**2 a 2 b**2 b 2 c**2 c 2 print('YES') print 'YES' print('NO') print 'NO' c = sorted([int(i) for i in input().split(' ')]) sorted([int(i) for i in input().split(' ')]) c a,b,c = sorted([int(i) for i in input().split(' ')]) sorted([int(i) for i in input().split(' ')]) a line = int(input()) int(input()) line b,c = sorted([int(i) for i in input().split(' ')]) sorted([int(i) for i in input().split(' ')]) b
line = int(input())
for i in range(line):
	a,b,c = sorted([int(i) for i in input().split(' ')])

	if a**2 + b**2 == c**2:
		print('YES')
	else:
		print('NO')