def f(n):

    l, r = 0, 1 << 10

    while r - l > 1:

        m = (l + r) // 2

        if m ** 5 <= n:

            l = m

        else:

            r = m

    return l if l ** 5 == n else 0



X = int(eval(input()))

for i in range(1 << 10):

    a = f(X + i ** 5)

    if a:

        print((a, i))

        break

    a = f(X - i ** 5)

    if a:

        print((a, -i))

        break
def calc(n):

    x = 1 << (n.bit_length() + 4) // 5

    y = (4 * x + n // (x ** 4)) // 5

    while y < x:

        x = y

        y = (4 * x + n // (x ** 4)) // 5

    return x

def f(n):

    return calc(n) if n > 0 and calc(n) ** 5 == n else 0



X = int(eval(input()))

for i in range(1 << 10):

    a = f(X + i ** 5)

    if a:

        print((a, i))

        break

    a = f(X - i ** 5)

    if a:

        print((a, -i))

        break
def f(n):
    l, r = 0, 1 << 10
    while r - l > 1:
        m = (l + r) // 2
        if m**5 <= n:
            l = m
        else:
            r = m
    return l if l**5 == n else 0


X = int(eval(input()))
for i in range(1 << 10):
    a = f(X + i**5)
    if a:
        print((a, i))
        break
    a = f(X - i**5)
    if a:
        print((a, -i))
        break

def calc(n):
    x = 1 << (n.bit_length() + 4) // 5
    y = (4 * x + n // (x**4)) // 5
    while y < x:
        x = y
        y = (4 * x + n // (x**4)) // 5
    return x


def f(n):
    return calc(n) if n > 0 and calc(n) ** 5 == n else 0


X = int(eval(input()))
for i in range(1 << 10):
    a = f(X + i**5)
    if a:
        print((a, i))
        break
    a = f(X - i**5)
    if a:
        print((a, -i))
        break

+def calc(n): +    x = 1 << (n.bit_length() + 4) // 5 +    y = (4 * x + n // (x**4)) // 5 +    while y < x: +        x = y +        y = (4 * x + n // (x**4)) // 5 +    return x + + -    l, r = 0, 1 << 10 -    while r - l > 1: -        m = (l + r) // 2 -        if m**5 <= n: -            l = m -        else: -            r = m -    return l if l**5 == n else 0 +    return calc(n) if n > 0 and calc(n) ** 5 == n else 0