x = int(eval(input()))



poypoyo = 'po'

for i in range(10000):

    for j in range(10000):

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

            print((i,j))

            quit()

            break

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

            print((i,-j))

            quit()

            break

        po = 'po'

        poypoyo += po



x = int(eval(input()))



for i in range(10000):

    for j in range(1000):

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

            print((i,j))

            quit()

            break

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

            print((i,-j))

            quit()

            break





x = int(eval(input()))
poypoyo = "po"
for i in range(10000):
    for j in range(10000):
        if i**5 - j**5 == x:
            print((i, j))
            quit()
            break
        if i**5 - (-j) ** 5 == x:
            print((i, -j))
            quit()
            break
        po = "po"
        poypoyo += po

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

-poypoyo = "po" -    for j in range(10000): +    for j in range(1000): -        po = "po" -        poypoyo += po