l=[]

for i in range(0,1001):

    l.append(i**5)

n=int(eval(input()))

for i in range(0,1001):

    if((l[i]-n) in l):

        print((i,l.index(l[i]-n)))

        break

    elif((n-l[i]) in l):

        print((i,-l.index(-l[i]+n)))

        break



        

    
l=[]

for i in range(0,120):

    l.append(i**5)

n=int(eval(input()))

for i in range(0,120):

    if((l[i]-n) in l):

        print((i,l.index(l[i]-n)))

        break

    elif((n-l[i]) in l):

        print((i,-l.index(-l[i]+n)))

        break



        

    
l = []
for i in range(0, 1001):
    l.append(i**5)
n = int(eval(input()))
for i in range(0, 1001):
    if (l[i] - n) in l:
        print((i, l.index(l[i] - n)))
        break
    elif (n - l[i]) in l:
        print((i, -l.index(-l[i] + n)))
        break

l = []
for i in range(0, 120):
    l.append(i**5)
n = int(eval(input()))
for i in range(0, 120):
    if (l[i] - n) in l:
        print((i, l.index(l[i] - n)))
        break
    elif (n - l[i]) in l:
        print((i, -l.index(-l[i] + n)))
        break

-for i in range(0, 1001): +for i in range(0, 120): -for i in range(0, 1001): +for i in range(0, 120):