def f(n):

    l, r = 0, 1 << 20

    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 << 20):

    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 f(n):
    l, r = 0, 1 << 20
    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 << 20):
    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

-    l, r = 0, 1 << 20 +    l, r = 0, 1 << 10 -for i in range(1 << 20): +for i in range(1 << 10):