X = int(eval(input()))



gojyous = []



for i in range(-200, 201):

    gojyous.append(i ** 5)



#print(gojyous)



for i in range(-200,201):

    for j in range(-200,201):

        if(X == (int(i**5) - int(j**5))):

            print((i, j))

            exit()
import sys



X= int(eval(input()))



#添字の最大値を算出



a = 1

b = 0

dif = 0

while dif < 10**9:

    a += 1

    b += 1



    dif = a ** 5 - b ** 5



loop_sequence = a - 1



for i in range(-(loop_sequence),loop_sequence):

	for j in range(-(loop_sequence),loop_sequence):

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

			print((i,j))

			sys.exit()

X = int(eval(input()))
gojyous = []
for i in range(-200, 201):
    gojyous.append(i**5)
# print(gojyous)
for i in range(-200, 201):
    for j in range(-200, 201):
        if X == (int(i**5) - int(j**5)):
            print((i, j))
            exit()

import sys

X = int(eval(input()))
# 添字の最大値を算出
a = 1
b = 0
dif = 0
while dif < 10**9:
    a += 1
    b += 1
    dif = a**5 - b**5
loop_sequence = a - 1
for i in range(-(loop_sequence), loop_sequence):
    for j in range(-(loop_sequence), loop_sequence):
        if X == i**5 - j**5:
            print((i, j))
            sys.exit()

+import sys + -gojyous = [] -for i in range(-200, 201): -    gojyous.append(i**5) -# print(gojyous) -for i in range(-200, 201): -    for j in range(-200, 201): -        if X == (int(i**5) - int(j**5)): +# 添字の最大値を算出 +a = 1 +b = 0 +dif = 0 +while dif < 10**9: +    a += 1 +    b += 1 +    dif = a**5 - b**5 +loop_sequence = a - 1 +for i in range(-(loop_sequence), loop_sequence): +    for j in range(-(loop_sequence), loop_sequence): +        if X == i**5 - j**5: -            exit() +            sys.exit()