rep = input()
while rep:
	rep -= 1
	[a, b, c] = map(int, raw_input().split())
	if b < a and c < a:
		a **= 2
		b = b ** 2 + c ** 2
	elif a < b and c < b:
		a = a ** 2 + c ** 2	
		b **= 2
	else:
		a = a ** 2 + b ** 2
		b = c ** 2
	if a == b:
		print 'YES'
	else:
		print 'NO' rep = input() rep input() input while rep:
	rep -= 1
	[a, b, c] = map(int, raw_input().split())
	if b < a and c < a:
		a **= 2
		b = b ** 2 + c ** 2
	elif a < b and c < b:
		a = a ** 2 + c ** 2	
		b **= 2
	else:
		a = a ** 2 + b ** 2
		b = c ** 2
	if a == b:
		print 'YES'
	else:
		print 'NO' rep rep -= 1 rep 1 [a, b, c] = map(int, raw_input().split()) [a, b, c] a b c map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if b < a and c < a:
		a **= 2
		b = b ** 2 + c ** 2
	elif a < b and c < b:
		a = a ** 2 + c ** 2	
		b **= 2
	else:
		a = a ** 2 + b ** 2
		b = c ** 2
	 b < a and c < a b < a b a c < a c a a **= 2 a 2 b = b ** 2 + c ** 2 b b ** 2 + c ** 2 b ** 2 b 2 c ** 2 c 2 elif a < b and c < b:
		a = a ** 2 + c ** 2	
		b **= 2
	 a < b and c < b a < b a b c < b c b a = a ** 2 + c ** 2 a a ** 2 + c ** 2 a ** 2 a 2 c ** 2 c 2 b **= 2 b 2 a = a ** 2 + b ** 2 a a ** 2 + b ** 2 a ** 2 a 2 b ** 2 b 2 b = c ** 2 b c ** 2 c 2 if a == b:
		print 'YES'
	else:
		print 'NO' a == b a b print print b = c ** 2 c ** 2 b rep -= 1 1 rep a = a ** 2 + b ** 2 a ** 2 + b ** 2 a b **= 2 2 b a **= 2 2 a rep = input() input() rep b = b ** 2 + c ** 2 b ** 2 + c ** 2 b a = a ** 2 + c ** 2 a ** 2 + c ** 2 a
rep = input()
while rep:
	rep -= 1
	[a, b, c] = map(int, raw_input().split())
	if b < a and c < a:
		a **= 2
		b = b ** 2 + c ** 2
	elif a < b and c < b:
		a = a ** 2 + c ** 2	
		b **= 2
	else:
		a = a ** 2 + b ** 2
		b = c ** 2
	if a == b:
		print 'YES'
	else:
		print 'NO'