def solve(string):

    x = int(string)

    a = {i**5: i for i in range(-10000, 10000)}

    for i in range(-10000, 10000):

        if x + i ** 5 in a:

            return str(f"{a[x+i**5]} {i}")





if __name__ == '__main__':

    import sys

    print((solve(sys.stdin.read().strip())))

def solve(string):

    x = int(string)

    a = {i**5: i for i in range(-120, 121)}

    for i in range(-121, 121):

        if x + i ** 5 in a:

            return str(f"{a[x+i**5]} {i}")





if __name__ == '__main__':

    import sys

    print((solve(sys.stdin.read().strip())))

def solve(string):
    x = int(string)
    a = {i**5: i for i in range(-10000, 10000)}
    for i in range(-10000, 10000):
        if x + i**5 in a:
            return str(f"{a[x+i**5]} {i}")


if __name__ == "__main__":
    import sys

    print((solve(sys.stdin.read().strip())))

def solve(string):
    x = int(string)
    a = {i**5: i for i in range(-120, 121)}
    for i in range(-121, 121):
        if x + i**5 in a:
            return str(f"{a[x+i**5]} {i}")


if __name__ == "__main__":
    import sys

    print((solve(sys.stdin.read().strip())))

-    a = {i**5: i for i in range(-10000, 10000)} -    for i in range(-10000, 10000): +    a = {i**5: i for i in range(-120, 121)} +    for i in range(-121, 121):