X = int(eval(input()))

import sys

for i in range(-1000, 1000):

    for j in range(-1000, 1000):

        a = pow(i, 5)

        b = pow(j, 5)

        if a - b == X:

            print((i, j))

            sys.exit(0)
X = int(eval(input()))

import sys 

for i in range(-500,500):

    for j in range(-500, 500):

        if i**5 - j**5 == X:

            print((i, j))

            sys.exit(0)
X = int(eval(input()))
import sys

for i in range(-1000, 1000):
    for j in range(-1000, 1000):
        a = pow(i, 5)
        b = pow(j, 5)
        if a - b == X:
            print((i, j))
            sys.exit(0)

X = int(eval(input()))
import sys

for i in range(-500, 500):
    for j in range(-500, 500):
        if i**5 - j**5 == X:
            print((i, j))
            sys.exit(0)

-for i in range(-1000, 1000): -    for j in range(-1000, 1000): -        a = pow(i, 5) -        b = pow(j, 5) -        if a - b == X: +for i in range(-500, 500): +    for j in range(-500, 500): +        if i**5 - j**5 == X: