import sys

N = int(sys.stdin.readline())

def check(num_list):
    largest = max(num_list)
    largest_idx = num_list.index(largest)
    tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
    if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO"

for i in xrange(N):
    line = sys.stdin.readline()
    num_list = map(int, line.strip().split())
    print "{0}".format(check(num_list)) import sys sys N = int(sys.stdin.readline()) N int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline def check(num_list):
    largest = max(num_list)
    largest_idx = num_list.index(largest)
    tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
    if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO" check largest = max(num_list) largest max(num_list) max num_list largest_idx = num_list.index(largest) largest_idx num_list.index(largest) num_list.index num_list index largest pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx for i, x in enumerate(num_list) if i != largest_idx i x enumerate(num_list) enumerate num_list i != largest_idx i largest_idx if i != largest_idx pow(x, 2) pow x 2 tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx]) tmp sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx]) sum [pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx] if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO" tmp == pow(largest, 2) tmp pow(largest, 2) pow largest 2 return "YES" "YES" return "NO" "NO" num_list num_list for i in xrange(N):
    line = sys.stdin.readline()
    num_list = map(int, line.strip().split())
    print "{0}".format(check(num_list)) i xrange(N) xrange N line = sys.stdin.readline() line sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline num_list = map(int, line.strip().split()) num_list map(int, line.strip().split()) map int line.strip().split() line.strip().split line.strip() line.strip line strip split print "{0}".format(check(num_list)) "{0}".format "{0}" format check(num_list) check num_list def check(num_list):
    largest = max(num_list)
    largest_idx = num_list.index(largest)
    tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
    if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO" def check(num_list):
    largest = max(num_list)
    largest_idx = num_list.index(largest)
    tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
    if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO" check N = int(sys.stdin.readline()) int(sys.stdin.readline()) N line = sys.stdin.readline() sys.stdin.readline() line num_list = map(int, line.strip().split()) map(int, line.strip().split()) num_list
import sys

N = int(sys.stdin.readline())

def check(num_list):
    largest = max(num_list)
    largest_idx = num_list.index(largest)
    tmp = sum([pow(x, 2) for i, x in enumerate(num_list) if i != largest_idx])
    if tmp == pow(largest, 2):
        return "YES"
    else:
        return "NO"

for i in xrange(N):
    line = sys.stdin.readline()
    num_list = map(int, line.strip().split())
    print "{0}".format(check(num_list))