X=int(eval(input()))

x=0

list=[]

for i in range(-118,120,1):



    for j in range(-119,119,1):

        x=i**5-j**5

        if x==X:

            list.append((str(i)+' '+str(j)))



print((list[0]))
X=int(eval(input()))

x=0

list=[]

for i in range(-118,120,1):

    for j in range(-119,119,1):

        x=i**5-j**5

        if x==X:

            print((str(i)+' '+str(j)))

            break

    else:

        continue

    break

X = int(eval(input()))
x = 0
list = []
for i in range(-118, 120, 1):
    for j in range(-119, 119, 1):
        x = i**5 - j**5
        if x == X:
            list.append((str(i) + " " + str(j)))
print((list[0]))

X = int(eval(input()))
x = 0
list = []
for i in range(-118, 120, 1):
    for j in range(-119, 119, 1):
        x = i**5 - j**5
        if x == X:
            print((str(i) + " " + str(j)))
            break
    else:
        continue
    break

-            list.append((str(i) + " " + str(j))) -print((list[0])) +            print((str(i) + " " + str(j))) +            break +    else: +        continue +    break