#! /usr/bin/env python3

noOfInputs = int(input())
for i in range(noOfInputs):
	numsInStr = input().split()
	nums = []
	for n in numsInStr:
		nums.append(int(n))

	largest = max(nums)	
	nums.remove(max(nums))
	#print(nums)

	if (largest**2 == sum([i**2 for i in nums])):
		print('YES')
	else:
		print('NO') noOfInputs = int(input()) noOfInputs int(input()) int input() input for i in range(noOfInputs):
	numsInStr = input().split()
	nums = []
	for n in numsInStr:
		nums.append(int(n))

	largest = max(nums)	
	nums.remove(max(nums))
	#print(nums)

	if (largest**2 == sum([i**2 for i in nums])):
		print('YES')
	else:
		print('NO') i range(noOfInputs) range noOfInputs numsInStr = input().split() numsInStr input().split() ().split () input split nums = [] nums [] for n in numsInStr:
		nums.append(int(n))

	 n numsInStr nums.append(int(n)) nums.append nums append int(n) int n largest = max(nums) largest max(nums) max nums nums.remove(max(nums)) nums.remove nums remove max(nums) max nums if (largest**2 == sum([i**2 for i in nums])):
		print('YES')
	else:
		print('NO') largest**2 == sum([i**2 for i in nums]) largest**2 largest 2 sum([i**2 for i in nums]) sum [i**2 for i in nums] print('YES') print 'YES' print('NO') print 'NO' nums = [] [] nums noOfInputs = int(input()) int(input()) noOfInputs numsInStr = input().split() input().split() numsInStr largest = max(nums) max(nums) largest
#! /usr/bin/env python3

noOfInputs = int(input())
for i in range(noOfInputs):
	numsInStr = input().split()
	nums = []
	for n in numsInStr:
		nums.append(int(n))

	largest = max(nums)	
	nums.remove(max(nums))
	#print(nums)

	if (largest**2 == sum([i**2 for i in nums])):
		print('YES')
	else:
		print('NO')