N = int(input())
for i in range(N):
    a,b,c = map(int,input().split())
    if a*a + b*b == c*c or b*b+c*c == a*a or a*a+c*c == b*b:
        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*a + b*b == c*c or b*b+c*c == a*a or a*a+c*c == b*b:
        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*a + b*b == c*c or b*b+c*c == a*a or a*a+c*c == b*b:
        print("YES")
    else:
        print("NO") a*a + b*b == c*c or b*b+c*c == a*a or a*a+c*c == b*b a*a + b*b == c*c or b*b+c*c == a*a a*a + b*b == c*c a*a + b*b a*a a a b*b b b c*c c c b*b+c*c == a*a b*b+c*c b*b b b c*c c c a*a a a a*a+c*c == b*b a*a+c*c a*a a a c*c c c b*b b b print("YES") print "YES" print("NO") print "NO" N = int(input()) int(input()) N a,b,c = map(int,input().split()) map(int,input().split()) a 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*a + b*b == c*c or b*b+c*c == a*a or a*a+c*c == b*b:
        print("YES")
    else:
        print("NO")