from bisect import bisect_right

import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines



def main():

    x = int(readline())



    for a in range(-120, 120):

        for b in range(-120, 120):

            if a**5 - b**5 == x:

                print((a, b))

                exit()





if __name__ == "__main__":

    main()

# AC: 33 msec(Python3)

from itertools import combinations_with_replacement

import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines



def main():

    x = int(readline())



    ab = [i**5 for i in range(200)]



    C = combinations_with_replacement(ab, 2)

    for a, b in C:

        if a + b == x:

            print((int(pow(b, 0.2)), -int(pow(a, 0.2))))

            break

        

        if b - a == x:

            print((int(pow(b, 0.2)), int(pow(a, 0.2))))

            break





if __name__ == "__main__":

    main()

from bisect import bisect_right
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def main():
    x = int(readline())
    for a in range(-120, 120):
        for b in range(-120, 120):
            if a**5 - b**5 == x:
                print((a, b))
                exit()


if __name__ == "__main__":
    main()

# AC: 33 msec(Python3)
from itertools import combinations_with_replacement
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def main():
    x = int(readline())
    ab = [i**5 for i in range(200)]
    C = combinations_with_replacement(ab, 2)
    for a, b in C:
        if a + b == x:
            print((int(pow(b, 0.2)), -int(pow(a, 0.2))))
            break
        if b - a == x:
            print((int(pow(b, 0.2)), int(pow(a, 0.2))))
            break


if __name__ == "__main__":
    main()

-from bisect import bisect_right +# AC: 33 msec(Python3) +from itertools import combinations_with_replacement -    for a in range(-120, 120): -        for b in range(-120, 120): -            if a**5 - b**5 == x: -                print((a, b)) -                exit() +    ab = [i**5 for i in range(200)] +    C = combinations_with_replacement(ab, 2) +    for a, b in C: +        if a + b == x: +            print((int(pow(b, 0.2)), -int(pow(a, 0.2)))) +            break +        if b - a == x: +            print((int(pow(b, 0.2)), int(pow(a, 0.2)))) +            break