import sys

count = int(raw_input())
#print count                                                                                                                                                                                                                                   
while 0 < count:
    count -=1
    #print count                                                                                                                                                                                                                               
    a = map(int,raw_input().split())
    #print a[0],a[1],a[2]                                                                                                                                                                                                                      

    if a[1]< a[2]:
        tmp = a[1]
        a[1] = a[2]
        a[2] = tmp

    if a[0] < a[1]:
        tmp = a[0]
        a[0] = a[1]
        a[1] = tmp

    n = a[1]*a[1] + a[2]*a[2]
    if a[0]*a[0] == n:
        print "YES"
    else:
        print "NO" import sys sys count = int(raw_input()) count int(raw_input()) int raw_input() raw_input while 0 < count:
    count -=1
    #print count                                                                                                                                                                                                                               
    a = map(int,raw_input().split())
    #print a[0],a[1],a[2]                                                                                                                                                                                                                      

    if a[1]< a[2]:
        tmp = a[1]
        a[1] = a[2]
        a[2] = tmp

    if a[0] < a[1]:
        tmp = a[0]
        a[0] = a[1]
        a[1] = tmp

    n = a[1]*a[1] + a[2]*a[2]
    if a[0]*a[0] == n:
        print "YES"
    else:
        print "NO" 0 < count 0 count count -=1 count 1 a = map(int,raw_input().split()) a map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split if a[1]< a[2]:
        tmp = a[1]
        a[1] = a[2]
        a[2] = tmp

     a[1]< a[2] a[1] a 1 a[2] a 2 tmp = a[1] tmp a[1] a 1 a[1] = a[2] a[1] a 1 a[2] a 2 a[2] = tmp a[2] a 2 tmp if a[0] < a[1]:
        tmp = a[0]
        a[0] = a[1]
        a[1] = tmp

     a[0] < a[1] a[0] a 0 a[1] a 1 tmp = a[0] tmp a[0] a 0 a[0] = a[1] a[0] a 0 a[1] a 1 a[1] = tmp a[1] a 1 tmp n = a[1]*a[1] + a[2]*a[2] n a[1]*a[1] + a[2]*a[2] a[1]*a[1] a[1] a 1 a[1] a 1 a[2]*a[2] a[2] a 2 a[2] a 2 if a[0]*a[0] == n:
        print "YES"
    else:
        print "NO" a[0]*a[0] == n a[0]*a[0] a[0] a 0 a[0] a 0 n print print count -=1 1 count tmp = a[0] a[0] tmp tmp = a[1] a[1] tmp n = a[1]*a[1] + a[2]*a[2] a[1]*a[1] + a[2]*a[2] n count = int(raw_input()) int(raw_input()) count a = map(int,raw_input().split()) map(int,raw_input().split()) a
import sys

count = int(raw_input())
#print count                                                                                                                                                                                                                                   
while 0 < count:
    count -=1
    #print count                                                                                                                                                                                                                               
    a = map(int,raw_input().split())
    #print a[0],a[1],a[2]                                                                                                                                                                                                                      

    if a[1]< a[2]:
        tmp = a[1]
        a[1] = a[2]
        a[2] = tmp

    if a[0] < a[1]:
        tmp = a[0]
        a[0] = a[1]
        a[1] = tmp

    n = a[1]*a[1] + a[2]*a[2]
    if a[0]*a[0] == n:
        print "YES"
    else:
        print "NO"