import numpy as np

x = int(eval(input()))

tmp_list=[]

c=0

tmp_2=0

while(1):

    tmp_1=c**5

    if (tmp_1 - tmp_2)<=x:

        tmp_list+=[tmp_1]

    else:

        break

    tmp_2=tmp_1

    c+=1

 

def せいがわ(target:list,x) -> list:

    for i in np.flipud(target):

        for j in target:

            tmp=i+j

            if tmp==x:

                return [int(i**(1/5)),int(j**(1/5))*-1]

            if tmp>x:

                break

    return 0

 

def ふがわ(target:list,x) -> list:

    for i in np.flipud(target):

        for j in target:

            tmp=i-j

            if tmp==x:

                return [int(i**(1/5)),int(j**(1/5))]

            if tmp<x:

                break

    return 0

  

ans=ふがわ(tmp_list,x)

if ans==0:

    ans=せいがわ(tmp_list,x)

print((ans[0],ans[1]))
X = int(eval(input()))

for a in range(0, 121):

    for b in range(0, 121):

        if X == a**5 - b**5:

            print((a, b))

            exit()

        elif X == a**5 + b**5:

            print((a, -b))

            exit()

        elif X == -a**5 - (10**4 - b)**5:

            print((-a, 10**4 - b))

            exit()
import numpy as np

x = int(eval(input()))
tmp_list = []
c = 0
tmp_2 = 0
while 1:
    tmp_1 = c**5
    if (tmp_1 - tmp_2) <= x:
        tmp_list += [tmp_1]
    else:
        break
    tmp_2 = tmp_1
    c += 1


def せいがわ(target: list, x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp = i + j
            if tmp == x:
                return [int(i ** (1 / 5)), int(j ** (1 / 5)) * -1]
            if tmp > x:
                break
    return 0


def ふがわ(target: list, x) -> list:
    for i in np.flipud(target):
        for j in target:
            tmp = i - j
            if tmp == x:
                return [int(i ** (1 / 5)), int(j ** (1 / 5))]
            if tmp < x:
                break
    return 0


ans = ふがわ(tmp_list, x)
if ans == 0:
    ans = せいがわ(tmp_list, x)
print((ans[0], ans[1]))

X = int(eval(input()))
for a in range(0, 121):
    for b in range(0, 121):
        if X == a**5 - b**5:
            print((a, b))
            exit()
        elif X == a**5 + b**5:
            print((a, -b))
            exit()
        elif X == -(a**5) - (10**4 - b) ** 5:
            print((-a, 10**4 - b))
            exit()

-import numpy as np - -x = int(eval(input())) -tmp_list = [] -c = 0 -tmp_2 = 0 -while 1: -    tmp_1 = c**5 -    if (tmp_1 - tmp_2) <= x: -        tmp_list += [tmp_1] -    else: -        break -    tmp_2 = tmp_1 -    c += 1 - - -def せいがわ(target: list, x) -> list: -    for i in np.flipud(target): -        for j in target: -            tmp = i + j -            if tmp == x: -                return [int(i ** (1 / 5)), int(j ** (1 / 5)) * -1] -            if tmp > x: -                break -    return 0 - - -def ふがわ(target: list, x) -> list: -    for i in np.flipud(target): -        for j in target: -            tmp = i - j -            if tmp == x: -                return [int(i ** (1 / 5)), int(j ** (1 / 5))] -            if tmp < x: -                break -    return 0 - - -ans = ふがわ(tmp_list, x) -if ans == 0: -    ans = せいがわ(tmp_list, x) -print((ans[0], ans[1])) +X = int(eval(input())) +for a in range(0, 121): +    for b in range(0, 121): +        if X == a**5 - b**5: +            print((a, b)) +            exit() +        elif X == a**5 + b**5: +            print((a, -b)) +            exit() +        elif X == -(a**5) - (10**4 - b) ** 5: +            print((-a, 10**4 - b)) +            exit()