# coding: utf-8
# Here your code !

import sys
import math

r = sys.stdin.readlines()

n = [[int(i) for i in (j.split())] for j in r]

for i in range(1,n[0][0]+1):
    sq = []
    for a in n[i]:  #a is lengthes
        sq.append(a**2)
    if (sum(sq)-2*max(sq) == 0):
        print("YES")
    else:
        print("NO") import sys sys import math math r = sys.stdin.readlines() r sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines [int(i) for i in (j.split())] for j in r for j in r j r for j in r [int(i) for i in (j.split())] n = [[int(i) for i in (j.split())] for j in r] n [[int(i) for i in (j.split())] for j in r] for i in range(1,n[0][0]+1):
    sq = []
    for a in n[i]:  #a is lengthes
        sq.append(a**2)
    if (sum(sq)-2*max(sq) == 0):
        print("YES")
    else:
        print("NO") i range(1,n[0][0]+1) range 1 n[0][0]+1 n[0][0] [0] n 0 0 1 sq = [] sq [] for a in n[i]:  #a is lengthes
        sq.append(a**2)
     a n[i] n i sq.append(a**2) sq.append sq append a**2 a 2 if (sum(sq)-2*max(sq) == 0):
        print("YES")
    else:
        print("NO") sum(sq)-2*max(sq) == 0 sum(sq)-2*max(sq) sum(sq) sum sq 2*max(sq) 2 max(sq) max sq 0 print("YES") print "YES" print("NO") print "NO" sq = [] [] sq r = sys.stdin.readlines() sys.stdin.readlines() r n = [[int(i) for i in (j.split())] for j in r] [[int(i) for i in (j.split())] for j in r] n
# coding: utf-8
# Here your code !

import sys
import math

r = sys.stdin.readlines()

n = [[int(i) for i in (j.split())] for j in r]

for i in range(1,n[0][0]+1):
    sq = []
    for a in n[i]:  #a is lengthes
        sq.append(a**2)
    if (sum(sq)-2*max(sq) == 0):
        print("YES")
    else:
        print("NO")