n = int(input())
for i in range(n):
    a = list(map(int, input().split()))
    m = max(a)
    b = sum([i**2 for i in a if i != m])
    if (m**2 == b):
        print("YES")
    else:
        print("NO") n = int(input()) n int(input()) int input() input for i in range(n):
    a = list(map(int, input().split()))
    m = max(a)
    b = sum([i**2 for i in a if i != m])
    if (m**2 == b):
        print("YES")
    else:
        print("NO") i range(n) range n a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split m = max(a) m max(a) max a i**2 for i in a if i != m for i in a if i != m i a i != m i m if i != m i**2 i 2 b = sum([i**2 for i in a if i != m]) b sum([i**2 for i in a if i != m]) sum [i**2 for i in a if i != m] if (m**2 == b):
        print("YES")
    else:
        print("NO") m**2 == b m**2 m 2 b print("YES") print "YES" print("NO") print "NO" a = list(map(int, input().split())) list(map(int, input().split())) a n = int(input()) int(input()) n b = sum([i**2 for i in a if i != m]) sum([i**2 for i in a if i != m]) b m = max(a) max(a) m
n = int(input())
for i in range(n):
    a = list(map(int, input().split()))
    m = max(a)
    b = sum([i**2 for i in a if i != m])
    if (m**2 == b):
        print("YES")
    else:
        print("NO")