def main():

    x = int(eval(input()))

    for i in range(150, 0, -1):

        for j in range(i, -150, -1):

            cal = i ** 5 - j ** 5

            if cal == x:

                print((i, j))

                exit()





if __name__ == '__main__':

    main()

def main():

    x = int(eval(input()))

    for i in range(120):

        for j in range(i, -i, -1):

            cal = i ** 5 - j ** 5

            if cal == x:

                print((i, j))

                exit()





if __name__ == '__main__':

    main()

def main():
    x = int(eval(input()))
    for i in range(150, 0, -1):
        for j in range(i, -150, -1):
            cal = i**5 - j**5
            if cal == x:
                print((i, j))
                exit()


if __name__ == "__main__":
    main()

def main():
    x = int(eval(input()))
    for i in range(120):
        for j in range(i, -i, -1):
            cal = i**5 - j**5
            if cal == x:
                print((i, j))
                exit()


if __name__ == "__main__":
    main()

-    for i in range(150, 0, -1): -        for j in range(i, -150, -1): +    for i in range(120): +        for j in range(i, -i, -1):