def ok(a,b,c):
    return (a*a+b*b==c*c)

n=input()
for i in range(n):
    a,b,c=map(int,raw_input().split())
    if(ok(a,b,c) or ok(b,c,a) or ok(c,a,b)):
        print "YES"
    else:
        print "NO" def ok(a,b,c):
    return (a*a+b*b==c*c) ok return (a*a+b*b==c*c) a*a+b*b==c*c a*a+b*b a*a a a b*b b b c*c c c a a b b c c n=input() n input() input for i in range(n):
    a,b,c=map(int,raw_input().split())
    if(ok(a,b,c) or ok(b,c,a) or ok(c,a,b)):
        print "YES"
    else:
        print "NO" i range(n) range n a,b,c=map(int,raw_input().split()) a map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split b c if(ok(a,b,c) or ok(b,c,a) or ok(c,a,b)):
        print "YES"
    else:
        print "NO" ok(a,b,c) or ok(b,c,a) or ok(c,a,b) ok(a,b,c) or ok(b,c,a) ok(a,b,c) ok a b c ok(b,c,a) ok b c a ok(c,a,b) ok c a b print print def ok(a,b,c):
    return (a*a+b*b==c*c) def ok(a,b,c):
    return (a*a+b*b==c*c) ok b,c=map(int,raw_input().split()) map(int,raw_input().split()) b c=map(int,raw_input().split()) map(int,raw_input().split()) c n=input() input() n a,b,c=map(int,raw_input().split()) map(int,raw_input().split()) a
def ok(a,b,c):
    return (a*a+b*b==c*c)

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