X=int(eval(input()))



for i in range(200):

    for j in range(-200,200):

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

            print((i, j))

            exit()

X=int(eval(input()))



for i in range(120):

    for j in range(-120,120):

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

            print((i, j))

            exit()

X = int(eval(input()))
for i in range(200):
    for j in range(-200, 200):
        if X == (i**5 - j**5):
            print((i, j))
            exit()

X = int(eval(input()))
for i in range(120):
    for j in range(-120, 120):
        if X == (i**5 - j**5):
            print((i, j))
            exit()

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