import sys

data_list = sys.stdin.readlines()
data_length = int(data_list.pop(0))

for x in xrange(data_length):
	lines = map(int, data_list[x].strip().split())
	lines.sort(reverse = True)
	if lines[0]**2 == (lines[1]**2 + lines[2]**2):
		print "YES"
	else:
		print "NO" import sys sys data_list = sys.stdin.readlines() data_list sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines data_length = int(data_list.pop(0)) data_length int(data_list.pop(0)) int data_list.pop(0) data_list.pop data_list pop 0 for x in xrange(data_length):
	lines = map(int, data_list[x].strip().split())
	lines.sort(reverse = True)
	if lines[0]**2 == (lines[1]**2 + lines[2]**2):
		print "YES"
	else:
		print "NO" x xrange(data_length) xrange data_length lines = map(int, data_list[x].strip().split()) lines map(int, data_list[x].strip().split()) map int data_list[x].strip().split() [x].strip().split [x].strip() [x].strip [x] data_list x strip split lines.sort(reverse = True) lines.sort lines sort reverse = True reverse True if lines[0]**2 == (lines[1]**2 + lines[2]**2):
		print "YES"
	else:
		print "NO" lines[0]**2 == (lines[1]**2 + lines[2]**2) lines[0]**2 lines[0] lines 0 2 lines[1]**2 + lines[2]**2 lines[1]**2 lines[1] lines 1 2 lines[2]**2 lines[2] lines 2 2 print print data_list = sys.stdin.readlines() sys.stdin.readlines() data_list lines = map(int, data_list[x].strip().split()) map(int, data_list[x].strip().split()) lines data_length = int(data_list.pop(0)) int(data_list.pop(0)) data_length
import sys

data_list = sys.stdin.readlines()
data_length = int(data_list.pop(0))

for x in xrange(data_length):
	lines = map(int, data_list[x].strip().split())
	lines.sort(reverse = True)
	if lines[0]**2 == (lines[1]**2 + lines[2]**2):
		print "YES"
	else:
		print "NO"