# coding: utf-8





def solve(*args: str) -> str:

    x = int(args[0])



    ret = None

    for a in range(120):

        for b in range(120):

            a5, b5 = pow(a, 5), pow(b, 5)

            if a5-b5 == x:

                ret = (a, b)

            elif a5+b5 == x:

                ret = (a, -b)



    return ' '.join(map(str, ret))





if __name__ == "__main__":

    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8





def solve(*args: str) -> str:

    x = int(args[0])



    ret = None

    for b in range(120):

        for a in range(b, 120):

            a5, b5 = pow(a, 5), pow(b, 5)

            if a5-b5 == x:

                ret = (a, b)

            elif a5+b5 == x:

                ret = (a, -b)



    return ' '.join(map(str, ret))





if __name__ == "__main__":

    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8
def solve(*args: str) -> str:
    x = int(args[0])
    ret = None
    for a in range(120):
        for b in range(120):
            a5, b5 = pow(a, 5), pow(b, 5)
            if a5 - b5 == x:
                ret = (a, b)
            elif a5 + b5 == x:
                ret = (a, -b)
    return " ".join(map(str, ret))


if __name__ == "__main__":
    print((solve(*(open(0).read().splitlines()))))

# coding: utf-8
def solve(*args: str) -> str:
    x = int(args[0])
    ret = None
    for b in range(120):
        for a in range(b, 120):
            a5, b5 = pow(a, 5), pow(b, 5)
            if a5 - b5 == x:
                ret = (a, b)
            elif a5 + b5 == x:
                ret = (a, -b)
    return " ".join(map(str, ret))


if __name__ == "__main__":
    print((solve(*(open(0).read().splitlines()))))

-    for a in range(120): -        for b in range(120): +    for b in range(120): +        for a in range(b, 120):