
# compare function
def comp(items):
    return (items[0]**2 + items[1]**2 == items[2]**2)


# main function
def main():
    n = int(input())

    items = [0] * 3
    for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO")


if __name__ == '__main__':
    main() def comp(items):
    return (items[0]**2 + items[1]**2 == items[2]**2)


# main function comp return (items[0]**2 + items[1]**2 == items[2]**2) items[0]**2 + items[1]**2 == items[2]**2 items[0]**2 + items[1]**2 items[0]**2 items[0] items 0 2 items[1]**2 items[1] items 1 2 items[2]**2 items[2] items 2 2 items items def main():
    n = int(input())

    items = [0] * 3
    for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO") main n = int(input()) n int(input()) int input() input items = [0] * 3 items [0] * 3 [0] 0 3 for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO") tm range(n) range n str = (input()).split() str (input()).split() input()).split input() input split for i in range(3):
            items[i] = int(str[i])

         i range(3) range 3 items[i] = int(str[i]) items[i] items i int(str[i]) int str[i] str i items.sort() items.sort items sort if(comp(items)):
            print("YES")
        else:
            print("NO") comp(items) comp items print("YES") print "YES" print("NO") print "NO" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def comp(items):
    return (items[0]**2 + items[1]**2 == items[2]**2)


# main function def comp(items):
    return (items[0]**2 + items[1]**2 == items[2]**2)


# main function comp def main():
    n = int(input())

    items = [0] * 3
    for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO") def main():
    n = int(input())

    items = [0] * 3
    for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO") main

# compare function
def comp(items):
    return (items[0]**2 + items[1]**2 == items[2]**2)


# main function
def main():
    n = int(input())

    items = [0] * 3
    for tm in range(n):
        str = (input()).split()
        for i in range(3):
            items[i] = int(str[i])

        items.sort()

        if(comp(items)):
            print("YES")
        else:
            print("NO")


if __name__ == '__main__':
    main()