x = int(eval(input()))

y = 10**4



for i in range(y):

    for j in range(-y,y):

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

            print((i, j))

            exit()
x = int(eval(input()))



for i in range(-200,200):

    for j in range(-200, 200):

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

            print((i, j))

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

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

-y = 10**4 -for i in range(y): -    for j in range(-y, y): +for i in range(-200, 200): +    for j in range(-200, 200):