num = int( input() )
for j in range( num ) :
    inputed = list(map(int, input().split()))
    maxIndex = inputed.index( max(inputed) )
    judger = 0;
    for k in range( 3 ) :
        if( maxIndex != k ) :
            judger += inputed[ k ] ** 2
    if judger == ( inputed[ maxIndex ] ** 2 ) :
        print("YES")
    else :
        print("NO") num = int( input() ) num int( input() ) int input() input for j in range( num ) :
    inputed = list(map(int, input().split()))
    maxIndex = inputed.index( max(inputed) )
    judger = 0;
    for k in range( 3 ) :
        if( maxIndex != k ) :
            judger += inputed[ k ] ** 2
    if judger == ( inputed[ maxIndex ] ** 2 ) :
        print("YES")
    else :
        print("NO") j range( num ) range num inputed = list(map(int, input().split())) inputed list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split maxIndex = inputed.index( max(inputed) ) maxIndex inputed.index( max(inputed) ) inputed.index inputed index max(inputed) max inputed judger = 0 judger 0 for k in range( 3 ) :
        if( maxIndex != k ) :
            judger += inputed[ k ] ** 2
     k range( 3 ) range 3 if( maxIndex != k ) :
            judger += inputed[ k ] ** 2
     maxIndex != k maxIndex k judger += inputed[ k ] ** 2 judger inputed[ k ] ** 2 inputed[ k ] inputed k 2 if judger == ( inputed[ maxIndex ] ** 2 ) :
        print("YES")
    else :
        print("NO") judger == ( inputed[ maxIndex ] ** 2 ) judger inputed[ maxIndex ] ** 2 inputed[ maxIndex ] inputed maxIndex 2 print("YES") print "YES" print("NO") print "NO" inputed = list(map(int, input().split())) list(map(int, input().split())) inputed maxIndex = inputed.index( max(inputed) ) inputed.index( max(inputed) ) maxIndex judger = 0 0 judger num = int( input() ) int( input() ) num judger += inputed[ k ] ** 2 inputed[ k ] ** 2 judger
num = int( input() )
for j in range( num ) :
    inputed = list(map(int, input().split()))
    maxIndex = inputed.index( max(inputed) )
    judger = 0;
    for k in range( 3 ) :
        if( maxIndex != k ) :
            judger += inputed[ k ] ** 2
    if judger == ( inputed[ maxIndex ] ** 2 ) :
        print("YES")
    else :
        print("NO")