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