import itertools
def check(a,b,c):
    for p in itertools.permutations([a,b,c]):
        (x,y,z)=p
        if x*x+y*y==z*z:
            return True
    return False

n=input()
for i in range(n):
    (a,b,c)=map(eval,raw_input().split())
    if check(a,b,c):
        print "YES"
    else:
        print "NO" import itertools itertools def check(a,b,c):
    for p in itertools.permutations([a,b,c]):
        (x,y,z)=p
        if x*x+y*y==z*z:
            return True
    return False check for p in itertools.permutations([a,b,c]):
        (x,y,z)=p
        if x*x+y*y==z*z:
            return True
     p itertools.permutations([a,b,c]) itertools.permutations itertools permutations [a,b,c] a b c (x,y,z)=p (x,y,z) x y z p if x*x+y*y==z*z:
            return True
     x*x+y*y==z*z x*x+y*y x*x x x y*y y y z*z z z return True True return False False a a b b c c n=input() n input() input for i in range(n):
    (a,b,c)=map(eval,raw_input().split())
    if check(a,b,c):
        print "YES"
    else:
        print "NO" i range(n) range n (a,b,c)=map(eval,raw_input().split()) (a,b,c) a b c map(eval,raw_input().split()) map eval raw_input().split() ().split () raw_input split if check(a,b,c):
        print "YES"
    else:
        print "NO" check(a,b,c) check a b c print print def check(a,b,c):
    for p in itertools.permutations([a,b,c]):
        (x,y,z)=p
        if x*x+y*y==z*z:
            return True
    return False def check(a,b,c):
    for p in itertools.permutations([a,b,c]):
        (x,y,z)=p
        if x*x+y*y==z*z:
            return True
    return False check n=input() input() n
import itertools
def check(a,b,c):
    for p in itertools.permutations([a,b,c]):
        (x,y,z)=p
        if x*x+y*y==z*z:
            return True
    return False

n=input()
for i in range(n):
    (a,b,c)=map(eval,raw_input().split())
    if check(a,b,c):
        print "YES"
    else:
        print "NO"