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(-120,121):

    for j in range(-120,121):

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