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==a*a+c*c or c*c==b*b+a*a):
        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==a*a+c*c or c*c==b*b+a*a):
        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==a*a+c*c or c*c==b*b+a*a):
        print('YES')
    else:
        print('NO') a*a==b*b+c*c or b*b==a*a+c*c or c*c==b*b+a*a a*a==b*b+c*c or b*b==a*a+c*c a*a==b*b+c*c a*a a a b*b+c*c b*b b b c*c c c b*b==a*a+c*c b*b b b a*a+c*c a*a a a c*c c c c*c==b*b+a*a c*c c c b*b+a*a b*b b b a*a a a print('YES') print 'YES' print('NO') print 'NO' 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()) int(input()) N
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==a*a+c*c or c*c==b*b+a*a):
        print('YES')
    else:
        print('NO')