# coding:utf-8

def main():
    N = int(input().rstrip())

    for i in range(N):
        ls = list(map(int, input().split(' ')))
        ls.sort()

        if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
            
if __name__ == "__main__":
    main() def main():
    N = int(input().rstrip())

    for i in range(N):
        ls = list(map(int, input().split(' ')))
        ls.sort()

        if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
             main N = int(input().rstrip()) N int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip for i in range(N):
        ls = list(map(int, input().split(' ')))
        ls.sort()

        if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
             i range(N) range N ls = list(map(int, input().split(' '))) ls list(map(int, input().split(' '))) list map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' ls.sort() ls.sort ls sort if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
             ls[0]**2 + ls[1]**2 == ls[2]**2 ls[0]**2 + ls[1]**2 ls[0]**2 ls[0] ls 0 2 ls[1]**2 ls[1] ls 1 2 ls[2]**2 ls[2] ls 2 2 print('YES') print 'YES' print('NO') print 'NO' if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    N = int(input().rstrip())

    for i in range(N):
        ls = list(map(int, input().split(' ')))
        ls.sort()

        if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
             def main():
    N = int(input().rstrip())

    for i in range(N):
        ls = list(map(int, input().split(' ')))
        ls.sort()

        if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
             main
# coding:utf-8

def main():
    N = int(input().rstrip())

    for i in range(N):
        ls = list(map(int, input().split(' ')))
        ls.sort()

        if(ls[0]**2 + ls[1]**2 == ls[2]**2):
            print('YES')
        else:
            print('NO')
            
if __name__ == "__main__":
    main()