N = input()
for i in range(N):
	a, b, c = map(int, raw_input().split())
	t1 = a**2 + b ** 2 == c ** 2
	t2 = b**2 + c ** 2 == a ** 2
	t3 = c**2 + a ** 2 == b ** 2
	if t1 or t2 or t3:
		print("YES")
	else:
		print("NO") N = input() N input() input for i in range(N):
	a, b, c = map(int, raw_input().split())
	t1 = a**2 + b ** 2 == c ** 2
	t2 = b**2 + c ** 2 == a ** 2
	t3 = c**2 + a ** 2 == b ** 2
	if t1 or t2 or t3:
		print("YES")
	else:
		print("NO") i range(N) range N a, b, c = map(int, raw_input().split()) a map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split b c t1 = a**2 + b ** 2 == c ** 2 t1 a**2 + b ** 2 == c ** 2 a**2 + b ** 2 a**2 a 2 b ** 2 b 2 c ** 2 c 2 t2 = b**2 + c ** 2 == a ** 2 t2 b**2 + c ** 2 == a ** 2 b**2 + c ** 2 b**2 b 2 c ** 2 c 2 a ** 2 a 2 t3 = c**2 + a ** 2 == b ** 2 t3 c**2 + a ** 2 == b ** 2 c**2 + a ** 2 c**2 c 2 a ** 2 a 2 b ** 2 b 2 if t1 or t2 or t3:
		print("YES")
	else:
		print("NO") t1 or t2 or t3 t1 or t2 t1 t2 t3 print("YES") print "YES" print("NO") print "NO" t1 = a**2 + b ** 2 == c ** 2 a**2 + b ** 2 == c ** 2 t1 N = input() input() N b, c = map(int, raw_input().split()) map(int, raw_input().split()) b t2 = b**2 + c ** 2 == a ** 2 b**2 + c ** 2 == a ** 2 t2 a, b, c = map(int, raw_input().split()) map(int, raw_input().split()) a c = map(int, raw_input().split()) map(int, raw_input().split()) c t3 = c**2 + a ** 2 == b ** 2 c**2 + a ** 2 == b ** 2 t3
N = input()
for i in range(N):
	a, b, c = map(int, raw_input().split())
	t1 = a**2 + b ** 2 == c ** 2
	t2 = b**2 + c ** 2 == a ** 2
	t3 = c**2 + a ** 2 == b ** 2
	if t1 or t2 or t3:
		print("YES")
	else:
		print("NO")