n = int(input())

for i in range(n):
    a,b,c = map(int,input().split(" "))
    if a**2 == b**2 + c**2:
        print("YES")
    elif b**2 == a**2 + c**2:
        print("YES")
    elif c**2 == a**2 + b**2:
        print("YES")
    else:
        print("NO") n = int(input()) n int(input()) int input() input for i in range(n):
    a,b,c = map(int,input().split(" "))
    if a**2 == b**2 + c**2:
        print("YES")
    elif b**2 == a**2 + c**2:
        print("YES")
    elif c**2 == a**2 + b**2:
        print("YES")
    else:
        print("NO") i range(n) range n a,b,c = map(int,input().split(" ")) a map(int,input().split(" ")) map int input().split(" ") ().split () input split " " b c if a**2 == b**2 + c**2:
        print("YES")
    elif b**2 == a**2 + c**2:
        print("YES")
    elif c**2 == a**2 + b**2:
        print("YES")
    else:
        print("NO") a**2 == b**2 + c**2 a**2 a 2 b**2 + c**2 b**2 b 2 c**2 c 2 print("YES") print "YES" elif b**2 == a**2 + c**2:
        print("YES")
     b**2 == a**2 + c**2 b**2 b 2 a**2 + c**2 a**2 a 2 c**2 c 2 print("YES") print "YES" elif c**2 == a**2 + b**2:
        print("YES")
     c**2 == a**2 + b**2 c**2 c 2 a**2 + b**2 a**2 a 2 b**2 b 2 print("YES") print "YES" print("NO") print "NO" a,b,c = map(int,input().split(" ")) map(int,input().split(" ")) a n = int(input()) int(input()) n b,c = map(int,input().split(" ")) map(int,input().split(" ")) b c = map(int,input().split(" ")) map(int,input().split(" ")) c
n = int(input())

for i in range(n):
    a,b,c = map(int,input().split(" "))
    if a**2 == b**2 + c**2:
        print("YES")
    elif b**2 == a**2 + c**2:
        print("YES")
    elif c**2 == a**2 + b**2:
        print("YES")
    else:
        print("NO")