# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



# (X - Y) (X^4 + X^3 Y + X^2 Y^2 + X Y^3 + Y^4)

X = ir()



def make_divisors(n):  # nの約数を列挙

    divisors = []

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

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n//i)

    divisors.sort()

    return divisors



U = 5 * 10 ** 6

div = make_divisors(X)

for b in range(U):

    for d in div:        

        a = b + d

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

            print((a, b))

            exit()

        a = b - d

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

            print((b, a))

            exit()

# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



# (X - Y) (X^4 + X^3 Y + X^2 Y^2 + X Y^3 + Y^4)

X = ir()



def make_divisors(n):  # nの約数を列挙

    divisors = []

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

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n//i)

    divisors.sort()

    return divisors



U = 10 ** 4

div = make_divisors(X)

for a in range(U):

    for d in div:       

        b = a - d

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

            print((a, b))

            exit()

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
# (X - Y) (X^4 + X^3 Y + X^2 Y^2 + X Y^3 + Y^4)
X = ir()


def make_divisors(n):  # nの約数を列挙
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    divisors.sort()
    return divisors


U = 5 * 10**6
div = make_divisors(X)
for b in range(U):
    for d in div:
        a = b + d
        if a**5 - b**5 == X:
            print((a, b))
            exit()
        a = b - d
        if b**5 - a**5 == X:
            print((b, a))
            exit()

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
# (X - Y) (X^4 + X^3 Y + X^2 Y^2 + X Y^3 + Y^4)
X = ir()


def make_divisors(n):  # nの約数を列挙
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    divisors.sort()
    return divisors


U = 10**4
div = make_divisors(X)
for a in range(U):
    for d in div:
        b = a - d
        if a**5 - b**5 == X:
            print((a, b))
            exit()

-U = 5 * 10**6 +U = 10**4 -for b in range(U): +for a in range(U): -        a = b + d +        b = a - d -        a = b - d -        if b**5 - a**5 == X: -            print((b, a)) -            exit()