x = int(eval(input()))

a = 0

b = 0

for i in range(-200, 200):

    for j in range(-200, 200):

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

            a = i

            b = j

print((a, b))

x = int(eval(input()))

a = 0

b = 0

for i in range(-120, 120):

    for j in range(-120, 120):

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

            a = i

            b = j

print((a, b))

x = int(eval(input()))
a = 0
b = 0
for i in range(-200, 200):
    for j in range(-200, 200):
        if i**5 - j**5 == x:
            a = i
            b = j
print((a, b))

x = int(eval(input()))
a = 0
b = 0
for i in range(-120, 120):
    for j in range(-120, 120):
        if i**5 - j**5 == x:
            a = i
            b = j
print((a, b))

-for i in range(-200, 200): -    for j in range(-200, 200): +for i in range(-120, 120): +    for j in range(-120, 120):