import math

x=int(eval(input()))

for i in range(120):

 for j in range(-54,i):

  if math.pow(i,5)-math.pow(j,5)==x:print((i,j));exit()
import math

X = int(eval(input()))

a1 = math.ceil(X**(1/5))

N = int(1e10)

c = 0

b = 0

while c <= N:

    if b**5 < -X:

        b2 = b + 1

        break

    b -= 1

c = 0

while c <= N:

    c += 1

    b1 = math.floor((a1**5-X)**(1/5))

    a2 = math.floor((X+b2**5)**(1/5))

    if a1**5 - b1**5 == X:

        print((a1, b1))

        break

    elif a2**5 - b2**5 == X:

        print((a2, b2))

        break

    a1 += 1

    b2 += 1
import math

x = int(eval(input()))
for i in range(120):
    for j in range(-54, i):
        if math.pow(i, 5) - math.pow(j, 5) == x:
            print((i, j))
            exit()

import math

X = int(eval(input()))
a1 = math.ceil(X ** (1 / 5))
N = int(1e10)
c = 0
b = 0
while c <= N:
    if b**5 < -X:
        b2 = b + 1
        break
    b -= 1
c = 0
while c <= N:
    c += 1
    b1 = math.floor((a1**5 - X) ** (1 / 5))
    a2 = math.floor((X + b2**5) ** (1 / 5))
    if a1**5 - b1**5 == X:
        print((a1, b1))
        break
    elif a2**5 - b2**5 == X:
        print((a2, b2))
        break
    a1 += 1
    b2 += 1

-x = int(eval(input())) -for i in range(120): -    for j in range(-54, i): -        if math.pow(i, 5) - math.pow(j, 5) == x: -            print((i, j)) -            exit() +X = int(eval(input())) +a1 = math.ceil(X ** (1 / 5)) +N = int(1e10) +c = 0 +b = 0 +while c <= N: +    if b**5 < -X: +        b2 = b + 1 +        break +    b -= 1 +c = 0 +while c <= N: +    c += 1 +    b1 = math.floor((a1**5 - X) ** (1 / 5)) +    a2 = math.floor((X + b2**5) ** (1 / 5)) +    if a1**5 - b1**5 == X: +        print((a1, b1)) +        break +    elif a2**5 - b2**5 == X: +        print((a2, b2)) +        break +    a1 += 1 +    b2 += 1