def pgr(x, y, z):
    if x**2 + y**2 == z**2: return True
    else: return False
    
while 1:
    try:
        n = input()
        for i in range(n):
            a,b,c = map(int, raw_input().split())
            if (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
            else: print 'NO'
        break
    except EOFError:
        break def pgr(x, y, z):
    if x**2 + y**2 == z**2: return True
    else: return False
     pgr if x**2 + y**2 == z**2: return True
    else: return False
     x**2 + y**2 == z**2 x**2 + y**2 x**2 x 2 y**2 y 2 z**2 z 2 x x y y z z while 1:
    try:
        n = input()
        for i in range(n):
            a,b,c = map(int, raw_input().split())
            if (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
            else: print 'NO'
        break
    except EOFError:
        break 1 try:
        n = input()
        for i in range(n):
            a,b,c = map(int, raw_input().split())
            if (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
            else: print 'NO'
        break
    except EOFError:
        break except EOFError:
        break break n = input() n input() input for i in range(n):
            a,b,c = map(int, raw_input().split())
            if (pgr(a,b,c) or pgr(b,c,a) or pgr(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 (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
            else: print 'NO'
         pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b) pgr(a,b,c) or pgr(b,c,a) pgr(a,b,c) pgr a b c pgr(b,c,a) pgr b c a pgr(c,a,b) pgr c a b break c = map(int, raw_input().split()) map(int, raw_input().split()) c def pgr(x, y, z):
    if x**2 + y**2 == z**2: return True
    else: return False
     def pgr(x, y, z):
    if x**2 + y**2 == z**2: return True
    else: return False
     pgr b,c = map(int, raw_input().split()) map(int, raw_input().split()) b n = input() input() n a,b,c = map(int, raw_input().split()) map(int, raw_input().split()) a
def pgr(x, y, z):
    if x**2 + y**2 == z**2: return True
    else: return False
    
while 1:
    try:
        n = input()
        for i in range(n):
            a,b,c = map(int, raw_input().split())
            if (pgr(a,b,c) or pgr(b,c,a) or pgr(c,a,b)): print 'YES'
            else: print 'NO'
        break
    except EOFError:
        break