# 初期入力

import sys

import math

#input = sys.stdin.readline

X = int(eval(input()))

limit =10**5

a=0

b=0

for b in range(-1*limit ,limit):

    a5 =X+pow(b,5)

    if 0 <= a5: 

        a=math.pow(a5,0.2)

        a_int =int(a)

        dif =a_int**5 -b**5 -X

        if abs(dif)<10**(-5):

            break

    else:

        continue

print((a_int,b))
X = int(eval(input()))

y =120

a ={i**5 for i in range(-y,y)}

ans_a =0

ans_b =0

for b in range(-y,y):

    if X +b**5 in a:

        #ans_a =int( (X +b**5 +1)**0.2 )

        if X +b**5 >0:

            ans_a =int( (X +b**5 )**0.2 )

        else:

            ans_a = -int( abs(X +b**5 )**0.2 )

        ans_b =b

        break

print((ans_a,ans_b))

# 初期入力
import sys
import math

# input = sys.stdin.readline
X = int(eval(input()))
limit = 10**5
a = 0
b = 0
for b in range(-1 * limit, limit):
    a5 = X + pow(b, 5)
    if 0 <= a5:
        a = math.pow(a5, 0.2)
        a_int = int(a)
        dif = a_int**5 - b**5 - X
        if abs(dif) < 10 ** (-5):
            break
    else:
        continue
print((a_int, b))

X = int(eval(input()))
y = 120
a = {i**5 for i in range(-y, y)}
ans_a = 0
ans_b = 0
for b in range(-y, y):
    if X + b**5 in a:
        # ans_a =int( (X +b**5 +1)**0.2 )
        if X + b**5 > 0:
            ans_a = int((X + b**5) ** 0.2)
        else:
            ans_a = -int(abs(X + b**5) ** 0.2)
        ans_b = b
        break
print((ans_a, ans_b))

-# 初期入力 -import sys -import math - -# input = sys.stdin.readline -limit = 10**5 -a = 0 -b = 0 -for b in range(-1 * limit, limit): -    a5 = X + pow(b, 5) -    if 0 <= a5: -        a = math.pow(a5, 0.2) -        a_int = int(a) -        dif = a_int**5 - b**5 - X -        if abs(dif) < 10 ** (-5): -            break -    else: -        continue -print((a_int, b)) +y = 120 +a = {i**5 for i in range(-y, y)} +ans_a = 0 +ans_b = 0 +for b in range(-y, y): +    if X + b**5 in a: +        # ans_a =int( (X +b**5 +1)**0.2 ) +        if X + b**5 > 0: +            ans_a = int((X + b**5) ** 0.2) +        else: +            ans_a = -int(abs(X + b**5) ** 0.2) +        ans_b = b +        break +print((ans_a, ans_b))