x = int(eval(input()))

import math

f = 1

for A in range(-10**5,10**5):

    A5 = A ** 5

    if x - A5 > 0:

        f = -1

        B = round(math.pow(x - A5,1/5),0)

    else:

        B = round(math.pow(-(x - A5),1/5),0)

    if  A5 == x + int(B*f) ** 5:

        print((A,int(B)*f))

        quit()

x = int(eval(input()))

import math



for A in range(-10**3,10**3):

    for B in range(-10**3,10**3):

        if A ** 5 - B ** 5 == x:

            print((A,B))

            quit()

x = int(eval(input()))
import math

f = 1
for A in range(-(10**5), 10**5):
    A5 = A**5
    if x - A5 > 0:
        f = -1
        B = round(math.pow(x - A5, 1 / 5), 0)
    else:
        B = round(math.pow(-(x - A5), 1 / 5), 0)
    if A5 == x + int(B * f) ** 5:
        print((A, int(B) * f))
        quit()

x = int(eval(input()))
import math

for A in range(-(10**3), 10**3):
    for B in range(-(10**3), 10**3):
        if A**5 - B**5 == x:
            print((A, B))
            quit()

-f = 1 -for A in range(-(10**5), 10**5): -    A5 = A**5 -    if x - A5 > 0: -        f = -1 -        B = round(math.pow(x - A5, 1 / 5), 0) -    else: -        B = round(math.pow(-(x - A5), 1 / 5), 0) -    if A5 == x + int(B * f) ** 5: -        print((A, int(B) * f)) -        quit() +for A in range(-(10**3), 10**3): +    for B in range(-(10**3), 10**3): +        if A**5 - B**5 == x: +            print((A, B)) +            quit()