x=int(eval(input()))

i=1

flag=0

for i in range(10000):

    for j in range(-1000,1001):

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

            flag=1

            print((i,-j))

            exit(0)

    
x=int(eval(input()))

i=1

flag=0

for i in range(200):

    for j in range(-200,200):

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

            flag=1

            print((i,-j))

            exit(0)

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

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

-for i in range(10000): -    for j in range(-1000, 1001): +for i in range(200): +    for j in range(-200, 200):