X=int(eval(input()))



for i in range(-1000,1000):

    for j in range(-1000,1000):

        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(-1000, 1000):
    for j in range(-1000, 1000):
        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()

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