import sys

import itertools

X = int(eval(input()))

N = 300

ABs = []

for i in range(N):

    ABs.append(i**5)

    

for i in range(N):

    for j in range(N):

        if ABs[i]-ABs[j] == X:

            print((i,j))

            sys.exit()

        elif ABs[i]+ABs[j] == X:

            print((i,-j))

            sys.exit()
import sys

import itertools

X = int(eval(input()))

N = 120

ABs = []

for i in range(N):

    ABs.append(i**5)

    

for i in range(N):

    for j in range(N):

        if ABs[i]-ABs[j] == X:

            print((i,j))

            sys.exit()

        elif ABs[i]+ABs[j] == X:

            print((i,-j))

            sys.exit()
import sys
import itertools

X = int(eval(input()))
N = 300
ABs = []
for i in range(N):
    ABs.append(i**5)
for i in range(N):
    for j in range(N):
        if ABs[i] - ABs[j] == X:
            print((i, j))
            sys.exit()
        elif ABs[i] + ABs[j] == X:
            print((i, -j))
            sys.exit()

import sys
import itertools

X = int(eval(input()))
N = 120
ABs = []
for i in range(N):
    ABs.append(i**5)
for i in range(N):
    for j in range(N):
        if ABs[i] - ABs[j] == X:
            print((i, j))
            sys.exit()
        elif ABs[i] + ABs[j] == X:
            print((i, -j))
            sys.exit()

-N = 300 +N = 120