n=int(eval(input()))



while n:

    n-=1

    lis=list(map(int,input().split()))

    for i in range(3):

        for j in range(i+1,3):

            if lis[i]<lis[j]:

                a=lis[i]

                lis[i]=lis[j]

                lis[j]=a



    c,a,b=lis

    if c**2==a**2+b**2:

        print("YES")



    else:

        print("NO")



    
n=int(eval(input()))

for i in range(n):

    edge=input().split()

    edge=[int(j) for j in edge]

    edge.sort()



    if edge[2]**2==edge[0]**2+edge[1]**2:

        print("YES")

    else :

        print("NO")

        
n = int(eval(input()))
while n:
    n -= 1
    lis = list(map(int, input().split()))
    for i in range(3):
        for j in range(i + 1, 3):
            if lis[i] < lis[j]:
                a = lis[i]
                lis[i] = lis[j]
                lis[j] = a
    c, a, b = lis
    if c**2 == a**2 + b**2:
        print("YES")
    else:
        print("NO")

n = int(eval(input()))
for i in range(n):
    edge = input().split()
    edge = [int(j) for j in edge]
    edge.sort()
    if edge[2] ** 2 == edge[0] ** 2 + edge[1] ** 2:
        print("YES")
    else:
        print("NO")

-while n: -    n -= 1 -    lis = list(map(int, input().split())) -    for i in range(3): -        for j in range(i + 1, 3): -            if lis[i] < lis[j]: -                a = lis[i] -                lis[i] = lis[j] -                lis[j] = a -    c, a, b = lis -    if c**2 == a**2 + b**2: +for i in range(n): +    edge = input().split() +    edge = [int(j) for j in edge] +    edge.sort() +    if edge[2] ** 2 == edge[0] ** 2 + edge[1] ** 2: