import math

x = int(eval(input()))



def f(a, b):

    return (a ** 5) - (b ** 5)



sele = math.floor(x ** (1/4))



for j in range(-sele, sele + 1):

    for k in range(-sele, sele + 1):

        if f(j, k) == x:

            print((j, k))

            exit()
import math

x = int(eval(input()))



def f(a, b):

    return a ** 5 - b ** 5

def make_divisors(n):

    divisors = []

    for i in range(1, int(math.sqrt(n)) + 1):

        if n % i == 0:

            divisors.append(i)

            # √nで無い数についてもう一個プラス

            if i != n // i:

                divisors.append(n // i)

    return divisors

division = sorted(make_divisors(x))

sele = math.floor(x ** (1/4))

for div in division:

    for j in range(-sele, sele + 1):

        a1 = j

        b1 = j - div

        if f(a1, b1) == x:

            print((a1, b1))

            break

    else:

        continue

    break
import math

x = int(eval(input()))


def f(a, b):
    return (a**5) - (b**5)


sele = math.floor(x ** (1 / 4))
for j in range(-sele, sele + 1):
    for k in range(-sele, sele + 1):
        if f(j, k) == x:
            print((j, k))
            exit()

import math

x = int(eval(input()))


def f(a, b):
    return a**5 - b**5


def make_divisors(n):
    divisors = []
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0:
            divisors.append(i)
            # √nで無い数についてもう一個プラス
            if i != n // i:
                divisors.append(n // i)
    return divisors


division = sorted(make_divisors(x))
sele = math.floor(x ** (1 / 4))
for div in division:
    for j in range(-sele, sele + 1):
        a1 = j
        b1 = j - div
        if f(a1, b1) == x:
            print((a1, b1))
            break
    else:
        continue
    break

-    return (a**5) - (b**5) +    return a**5 - b**5 +def make_divisors(n): +    divisors = [] +    for i in range(1, int(math.sqrt(n)) + 1): +        if n % i == 0: +            divisors.append(i) +            # √nで無い数についてもう一個プラス +            if i != n // i: +                divisors.append(n // i) +    return divisors + + +division = sorted(make_divisors(x)) -for j in range(-sele, sele + 1): -    for k in range(-sele, sele + 1): -        if f(j, k) == x: -            print((j, k)) -            exit() +for div in division: +    for j in range(-sele, sele + 1): +        a1 = j +        b1 = j - div +        if f(a1, b1) == x: +            print((a1, b1)) +            break +    else: +        continue +    break