X=int(eval(input()))

for i in range(-200,201):

    for j in range(-200,201):

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

            print((i,j))

            exit()
X=int(eval(input()))

for i in range(-150,151):

    for j in range(-150,151):

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

            print((i,j))

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

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

-for i in range(-200, 201): -    for j in range(-200, 201): +for i in range(-150, 151): +    for j in range(-150, 151):