import sys

def input(): return sys.stdin.readline().rstrip()

def main():

    x=int(eval(input()))

    for i in range(-300,300):

        for j in range(-300,300):

            if i**5-j**5==x:

                print((i,j))

                sys.exit()



if __name__=='__main__':

    main()
import sys

def input(): return sys.stdin.readline().rstrip()

def main():

    x=int(eval(input()))

    for a in range(-118,120):

        for diff in range(238):

            if a**5-(a-diff)**5>10**9:

                break

            if a**5-(a-diff)**5==x:

                print((a,a-diff))

                sys.exit()



if __name__=='__main__':

    main()
import sys


def input():
    return sys.stdin.readline().rstrip()


def main():
    x = int(eval(input()))
    for i in range(-300, 300):
        for j in range(-300, 300):
            if i**5 - j**5 == x:
                print((i, j))
                sys.exit()


if __name__ == "__main__":
    main()

import sys


def input():
    return sys.stdin.readline().rstrip()


def main():
    x = int(eval(input()))
    for a in range(-118, 120):
        for diff in range(238):
            if a**5 - (a - diff) ** 5 > 10**9:
                break
            if a**5 - (a - diff) ** 5 == x:
                print((a, a - diff))
                sys.exit()


if __name__ == "__main__":
    main()

-    for i in range(-300, 300): -        for j in range(-300, 300): -            if i**5 - j**5 == x: -                print((i, j)) +    for a in range(-118, 120): +        for diff in range(238): +            if a**5 - (a - diff) ** 5 > 10**9: +                break +            if a**5 - (a - diff) ** 5 == x: +                print((a, a - diff))