# coding: utf-8

n = int(raw_input())
for i in range(n):
	data = map(int, raw_input().split())
	if data[0]**2 == data[1]**2 + data[2]**2:
		print("YES")
	elif data[1]**2 == data[2]**2 + data[0]**2:
		print("YES")
	elif data[2]**2 == data[0]**2 + data[1]**2:
		print("YES")
	else:
		print("NO") n = int(raw_input()) n int(raw_input()) int raw_input() raw_input for i in range(n):
	data = map(int, raw_input().split())
	if data[0]**2 == data[1]**2 + data[2]**2:
		print("YES")
	elif data[1]**2 == data[2]**2 + data[0]**2:
		print("YES")
	elif data[2]**2 == data[0]**2 + data[1]**2:
		print("YES")
	else:
		print("NO") i range(n) range n data = map(int, raw_input().split()) data map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split if data[0]**2 == data[1]**2 + data[2]**2:
		print("YES")
	elif data[1]**2 == data[2]**2 + data[0]**2:
		print("YES")
	elif data[2]**2 == data[0]**2 + data[1]**2:
		print("YES")
	else:
		print("NO") data[0]**2 == data[1]**2 + data[2]**2 data[0]**2 data[0] data 0 2 data[1]**2 + data[2]**2 data[1]**2 data[1] data 1 2 data[2]**2 data[2] data 2 2 print("YES") print "YES" elif data[1]**2 == data[2]**2 + data[0]**2:
		print("YES")
	 data[1]**2 == data[2]**2 + data[0]**2 data[1]**2 data[1] data 1 2 data[2]**2 + data[0]**2 data[2]**2 data[2] data 2 2 data[0]**2 data[0] data 0 2 print("YES") print "YES" elif data[2]**2 == data[0]**2 + data[1]**2:
		print("YES")
	 data[2]**2 == data[0]**2 + data[1]**2 data[2]**2 data[2] data 2 2 data[0]**2 + data[1]**2 data[0]**2 data[0] data 0 2 data[1]**2 data[1] data 1 2 print("YES") print "YES" print("NO") print "NO" data = map(int, raw_input().split()) map(int, raw_input().split()) data n = int(raw_input()) int(raw_input()) n
# coding: utf-8

n = int(raw_input())
for i in range(n):
	data = map(int, raw_input().split())
	if data[0]**2 == data[1]**2 + data[2]**2:
		print("YES")
	elif data[1]**2 == data[2]**2 + data[0]**2:
		print("YES")
	elif data[2]**2 == data[0]**2 + data[1]**2:
		print("YES")
	else:
		print("NO")