X = int(eval(input()))

A = 0

B = 0

for i in range(10 ** 3):

    for j in range(- 10 ** 3, 10 ** 3):

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

            A = i

            B = j

print((A, B))
X = int(eval(input()))

A = 0

B = 0

for a in range(1, 200):

    for b in range(-200, 200):

        if a ** 5 - b ** 5 == X:

            A = a

            B = b

print((A, B))
X = int(eval(input()))
A = 0
B = 0
for i in range(10**3):
    for j in range(-(10**3), 10**3):
        if i**5 - j**5 == X:
            A = i
            B = j
print((A, B))

X = int(eval(input()))
A = 0
B = 0
for a in range(1, 200):
    for b in range(-200, 200):
        if a**5 - b**5 == X:
            A = a
            B = b
print((A, B))

-for i in range(10**3): -    for j in range(-(10**3), 10**3): -        if i**5 - j**5 == X: -            A = i -            B = j +for a in range(1, 200): +    for b in range(-200, 200): +        if a**5 - b**5 == X: +            A = a +            B = b