x=int(eval(input()))

A = 0

B = 0

for a in range(-120, 120):

    a5 = a**5

    for b in range(-120, 120):

        if (a5 < x and b >=0 ) or (a5 > x and b <= 0):

            continue

        if a5 - b**5 == x:

            A = a

            B = b

            break

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



for a in range(-120, 120):

    a5 = a**5

    for b in range(-120, 120):

        if (a5 < x and b >= 0 ) or (a5 > x and b <= 0):

            continue

        if a5 - b**5 == x:

            print((a, b))

            break

    else:

        continue

    break
x = int(eval(input()))
A = 0
B = 0
for a in range(-120, 120):
    a5 = a**5
    for b in range(-120, 120):
        if (a5 < x and b >= 0) or (a5 > x and b <= 0):
            continue
        if a5 - b**5 == x:
            A = a
            B = b
            break
print((A, B))

x = int(eval(input()))
for a in range(-120, 120):
    a5 = a**5
    for b in range(-120, 120):
        if (a5 < x and b >= 0) or (a5 > x and b <= 0):
            continue
        if a5 - b**5 == x:
            print((a, b))
            break
    else:
        continue
    break

-A = 0 -B = 0 -            A = a -            B = b +            print((a, b)) -print((A, B)) +    else: +        continue +    break