def sol(n):

    d = {}

    N = 100000

    for i in range(-N, N+1):

        d[i**5]=i

    for i in d:

        j = n+i

        if j in d:

            print(d[j], d[i])

            return



def main():

    n = eval(input())

    sol(n)

if __name__ == '__main__':

    main()
def sol(n):

    d = {}

    N = 1000

    for i in range(-N, N+1):

        d[i**5]=i

    for i in d:

        j = n+i

        if j in d:

            print(d[j], d[i])

            return



def main():

    n = eval(input())

    sol(n)

if __name__ == '__main__':

    main()
def sol(n):
    d = {}
    N = 100000
    for i in range(-N, N + 1):
        d[i**5] = i
    for i in d:
        j = n + i
        if j in d:
            print(d[j], d[i])
            return


def main():
    n = eval(input())
    sol(n)


if __name__ == "__main__":
    main()

def sol(n):
    d = {}
    N = 1000
    for i in range(-N, N + 1):
        d[i**5] = i
    for i in d:
        j = n + i
        if j in d:
            print(d[j], d[i])
            return


def main():
    n = eval(input())
    sol(n)


if __name__ == "__main__":
    main()

-    N = 100000 +    N = 1000