x=int(eval(input()))

for i in range(-1000,1000,1):

    for j in range(-1000,1000,1):

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

            print((i,j))

            exit()
x=int(eval(input()))

for i in range(-150,150,1):

    for j in range(-150,150,1):

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

            print((i,j))

            exit()

x = int(eval(input()))
for i in range(-1000, 1000, 1):
    for j in range(-1000, 1000, 1):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

x = int(eval(input()))
for i in range(-150, 150, 1):
    for j in range(-150, 150, 1):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

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