def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    run() def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True judge lists.sort() lists.sort lists sort if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2 lists[0] ** 2 + lists[1] ** 2 lists[0] ** 2 lists[0] lists 0 2 lists[1] ** 2 lists[1] lists 1 2 lists[2] ** 2 lists[2] lists 2 2 return False False return True True lists lists def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO") run N = int(input()) N int(input()) int input() input for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO") _ range(N) range N if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO") judge([int(x) for x in input().split()]) judge [int(x) for x in input().split()] print("YES") print "YES" print("NO") print "NO" if __name__ == '__main__':
    run() __name__ == '__main__' __name__ '__main__' run() run def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO") def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO") run def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True judge
def judge(lists):
    lists.sort()
    if lists[0] ** 2 + lists[1] ** 2 - lists[2] ** 2:
        return False
    else:
        return True


def run():
    N = int(input())
    for _ in range(N):
        if judge([int(x) for x in input().split()]):
            print("YES")
        else:
            print("NO")

if __name__ == '__main__':
    run()
