N = input()
a = []
for i in range(N):
    a.append(map(int, raw_input().split()))

for j in range(N):

    x = a[j][0] ** 2
    y = a[j][1] ** 2
    z = a[j][2] ** 2

    if x == y + z:
        print "YES"
    elif y == x + z:
        print "YES"
    elif z == x + y:
        print "YES"
    else:
        print "NO" N = input() N input() input a = [] a [] for i in range(N):
    a.append(map(int, raw_input().split())) i range(N) range N a.append(map(int, raw_input().split())) a.append a append map(int, raw_input().split()) map int raw_input().split() ().split () raw_input split for j in range(N):

    x = a[j][0] ** 2
    y = a[j][1] ** 2
    z = a[j][2] ** 2

    if x == y + z:
        print "YES"
    elif y == x + z:
        print "YES"
    elif z == x + y:
        print "YES"
    else:
        print "NO" j range(N) range N x = a[j][0] ** 2 x a[j][0] ** 2 a[j][0] [j] a j 0 2 y = a[j][1] ** 2 y a[j][1] ** 2 a[j][1] [j] a j 1 2 z = a[j][2] ** 2 z a[j][2] ** 2 a[j][2] [j] a j 2 2 if x == y + z:
        print "YES"
    elif y == x + z:
        print "YES"
    elif z == x + y:
        print "YES"
    else:
        print "NO" x == y + z x y + z y z print elif y == x + z:
        print "YES"
     y == x + z y x + z x z print elif z == x + y:
        print "YES"
     z == x + y z x + y x y print print a = [] [] a N = input() input() N y = a[j][1] ** 2 a[j][1] ** 2 y z = a[j][2] ** 2 a[j][2] ** 2 z x = a[j][0] ** 2 a[j][0] ** 2 x
N = input()
a = []
for i in range(N):
    a.append(map(int, raw_input().split()))

for j in range(N):

    x = a[j][0] ** 2
    y = a[j][1] ** 2
    z = a[j][2] ** 2

    if x == y + z:
        print "YES"
    elif y == x + z:
        print "YES"
    elif z == x + y:
        print "YES"
    else:
        print "NO"