x = int(eval(input()))

for i in range(-200,200,1):

    for j in range(-200,200,1):

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

          print((i,j))

          exit()
import sys

x = int(eval(input()))

for i in range(-159,159,1):

    for j in range(-159,159,1):

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

            print((str(i)+' '+str(j)))

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

import sys

x = int(eval(input()))
for i in range(-159, 159, 1):
    for j in range(-159, 159, 1):
        if i**5 - j**5 == x:
            print((str(i) + " " + str(j)))
            sys.exit()

+import sys + -for i in range(-200, 200, 1): -    for j in range(-200, 200, 1): +for i in range(-159, 159, 1): +    for j in range(-159, 159, 1): -            print((i, j)) -            exit() +            print((str(i) + " " + str(j))) +            sys.exit()