X = int(eval(input()))#数字



for i in range(10 ** 8):

    for j in range(-10000,10 ** 4):

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

            print((i, j))

            exit()
x = int(eval(input()))

y = 10**4



for i in range(y):

    for j in range(-y,y):

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

            print((i, j))

            exit()
X = int(eval(input()))  # 数字
for i in range(10**8):
    for j in range(-10000, 10**4):
        if i**5 - j**5 == X:
            print((i, j))
            exit()

x = int(eval(input()))
y = 10**4
for i in range(y):
    for j in range(-y, y):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

-X = int(eval(input()))  # 数字 -for i in range(10**8): -    for j in range(-10000, 10**4): -        if i**5 - j**5 == X: +x = int(eval(input())) +y = 10**4 +for i in range(y): +    for j in range(-y, y): +        if i**5 - j**5 == x: