X=int(eval(input()))

for i in range(-1000,1000):

    for j in range(-1000,1000):

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

            print((i,j))

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

for i in range(-118,120):

    for j in range(-119,119):

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

            print((i,j))

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

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

-for i in range(-1000, 1000): -    for j in range(-1000, 1000): +for i in range(-118, 120): +    for j in range(-119, 119):