import sys



input = sys.stdin.readline





def main():

    X = int(eval(input()))



    for A in range(-200, 201):

        for B in range(-200, 201):

            if A ** 5 - B ** 5 == X:

                print((A, B))

                exit()





if __name__ == "__main__":

    main()

import sys



input = sys.stdin.readline





def main():

    X = int(eval(input()))



    for A in range(-119, 120 + 1):

        for B in range(-119, 120 + 1):

            if A ** 5 - B ** 5 == X:

                print((A, B))

                exit()





if __name__ == "__main__":

    main()

import sys

input = sys.stdin.readline


def main():
    X = int(eval(input()))
    for A in range(-200, 201):
        for B in range(-200, 201):
            if A**5 - B**5 == X:
                print((A, B))
                exit()


if __name__ == "__main__":
    main()

import sys

input = sys.stdin.readline


def main():
    X = int(eval(input()))
    for A in range(-119, 120 + 1):
        for B in range(-119, 120 + 1):
            if A**5 - B**5 == X:
                print((A, B))
                exit()


if __name__ == "__main__":
    main()

-    for A in range(-200, 201): -        for B in range(-200, 201): +    for A in range(-119, 120 + 1): +        for B in range(-119, 120 + 1):