# coding: utf-8
# Here your code !
N = int(input())

for i in range(N):
    a,b,c = map(int, input().split())
    flg = 0
    if a*a + b*b == c*c:
        flg = 1
    if c*c + a*a == b*b:
        flg = 1
    if b*b + c*c == a*a:
        flg = 1
    if flg == 1:
        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())
    flg = 0
    if a*a + b*b == c*c:
        flg = 1
    if c*c + a*a == b*b:
        flg = 1
    if b*b + c*c == a*a:
        flg = 1
    if flg == 1:
        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 flg = 0 flg 0 if a*a + b*b == c*c:
        flg = 1
     a*a + b*b == c*c a*a + b*b a*a a a b*b b b c*c c c flg = 1 flg 1 if c*c + a*a == b*b:
        flg = 1
     c*c + a*a == b*b c*c + a*a c*c c c a*a a a b*b b b flg = 1 flg 1 if b*b + c*c == a*a:
        flg = 1
     b*b + c*c == a*a b*b + c*c b*b b b c*c c c a*a a a flg = 1 flg 1 if flg == 1:
        print('YES')
    else:
        print('NO') flg == 1 flg 1 print('YES') print 'YES' print('NO') print 'NO' b,c = map(int, input().split()) map(int, input().split()) b flg = 1 1 flg N = int(input()) int(input()) N flg = 1 1 flg c = map(int, input().split()) map(int, input().split()) c flg = 0 0 flg flg = 1 1 flg a,b,c = map(int, input().split()) map(int, input().split()) a
# coding: utf-8
# Here your code !
N = int(input())

for i in range(N):
    a,b,c = map(int, input().split())
    flg = 0
    if a*a + b*b == c*c:
        flg = 1
    if c*c + a*a == b*b:
        flg = 1
    if b*b + c*c == a*a:
        flg = 1
    if flg == 1:
        print('YES')
    else:
        print('NO')