import itertools



X=int(eval(input()))

for A,B in itertools.product(list(range(150)),list(range(-150,150))):

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

        print((A, B))

        break

x=int(eval(input()))



for i in range(1,120):

    for j in range(-120,120):

        if ((i**5)-(j**5))==x:

            print((i, j))

            exit()

import itertools

X = int(eval(input()))
for A, B in itertools.product(list(range(150)), list(range(-150, 150))):
    if A**5 - B**5 == X:
        print((A, B))
        break

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

-import itertools - -X = int(eval(input())) -for A, B in itertools.product(list(range(150)), list(range(-150, 150))): -    if A**5 - B**5 == X: -        print((A, B)) -        break +x = int(eval(input())) +for i in range(1, 120): +    for j in range(-120, 120): +        if ((i**5) - (j**5)) == x: +            print((i, j)) +            exit()