def main():
    n = int(input())
    for i in range(n):
        Array = list(map(int,input().split()))
        Array.sort()
        if Array[2]**2 == Array[0]**2 + Array[1]**2:
            print("YES")
        else:
            print("NO")

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

if __name__ == '__main__':
    main()