def main():
    N = int(input())
    a = []
    for _ in range(N):
        a.append(list(map(int, input().split())))

    for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO")


if __name__ == "__main__":
    main() def main():
    N = int(input())
    a = []
    for _ in range(N):
        a.append(list(map(int, input().split())))

    for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO") main N = int(input()) N int(input()) int input() input a = [] a [] for _ in range(N):
        a.append(list(map(int, input().split())))

     _ range(N) range N a.append(list(map(int, input().split()))) a.append a append list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO") x range(N) range N a[x].sort(reverse = True) [x].sort [x] a x sort reverse = True reverse True if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO") a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2 a[x][0] ** 2 a[x][0] [x] a x 0 2 a[x][1] ** 2 + a[x][2] ** 2 a[x][1] ** 2 a[x][1] [x] a x 1 2 a[x][2] ** 2 a[x][2] [x] a x 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())
    a = []
    for _ in range(N):
        a.append(list(map(int, input().split())))

    for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO") def main():
    N = int(input())
    a = []
    for _ in range(N):
        a.append(list(map(int, input().split())))

    for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO") main
def main():
    N = int(input())
    a = []
    for _ in range(N):
        a.append(list(map(int, input().split())))

    for x in range(N):
        a[x].sort(reverse = True)
        if a[x][0] ** 2 == a[x][1] ** 2 + a[x][2] ** 2:
            print("YES")
        else:
            print("NO")


if __name__ == "__main__":
    main()