x = int(eval(input()))

def f(a,b):

    return pow(a,4) + b*pow(a,3) + pow(a*b,2) + a*pow(b,3) + pow(b,4)



def divisor(n):

    tank = []

    for i in range(1, int(n**0.5)+1):

        if n%i==0:

            tank.append(i)

            if i!=n//i:

                tank.append(n//i)

    tank.sort()

    return tank



lst = divisor(x)

for y in lst:

    for a in range(10000):

        div = x//y

        

        b = a - y

        if f(a,b) == div:

            print((a, b))

            exit()

            

        b = a + y

        if f(a, b) == (-1)*div:

            print((a,b))

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

lst = [(pow(i, 5), i) for i in range(-200, 200)]

for i in range(len(lst)):

    for j in range(len(lst)):

        if lst[j][0] - lst[i][0] == x:

            print((lst[j][1], lst[i][1]))

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


def f(a, b):
    return pow(a, 4) + b * pow(a, 3) + pow(a * b, 2) + a * pow(b, 3) + pow(b, 4)


def divisor(n):
    tank = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            tank.append(i)
            if i != n // i:
                tank.append(n // i)
    tank.sort()
    return tank


lst = divisor(x)
for y in lst:
    for a in range(10000):
        div = x // y
        b = a - y
        if f(a, b) == div:
            print((a, b))
            exit()
        b = a + y
        if f(a, b) == (-1) * div:
            print((a, b))
            exit()

x = int(eval(input()))
lst = [(pow(i, 5), i) for i in range(-200, 200)]
for i in range(len(lst)):
    for j in range(len(lst)):
        if lst[j][0] - lst[i][0] == x:
            print((lst[j][1], lst[i][1]))
            exit()

- - -def f(a, b): -    return pow(a, 4) + b * pow(a, 3) + pow(a * b, 2) + a * pow(b, 3) + pow(b, 4) - - -def divisor(n): -    tank = [] -    for i in range(1, int(n**0.5) + 1): -        if n % i == 0: -            tank.append(i) -            if i != n // i: -                tank.append(n // i) -    tank.sort() -    return tank - - -lst = divisor(x) -for y in lst: -    for a in range(10000): -        div = x // y -        b = a - y -        if f(a, b) == div: -            print((a, b)) +lst = [(pow(i, 5), i) for i in range(-200, 200)] +for i in range(len(lst)): +    for j in range(len(lst)): +        if lst[j][0] - lst[i][0] == x: +            print((lst[j][1], lst[i][1])) -        b = a + y -        if f(a, b) == (-1) * div: -            print((a, b)) -            exit()