from bisect import bisect_right

import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines



def main():

    x = int(readline())



    A = [i**5 for i in range(10**6)]

    for b in A:

        a = x + b

        idx = bisect_right(A, a) - 1

        if A[idx] == a:

            print((int(pow(a, 0.2)), int(pow(b, 0.2))))

            break

        

        a = x - b

        idx = bisect_right(A, a) - 1

        if A[idx] == a:

            print((int(pow(a, 0.2)), -int(pow(b, 0.2))))

            break





if __name__ == "__main__":

    main()

from itertools import combinations_with_replacement

import sys

read = sys.stdin.read

readline = sys.stdin.readline

readlines = sys.stdin.readlines



def main():

    x = int(readline())



    ab = [i**5 for i in range(10**3)]



    C = combinations_with_replacement(ab, 2)

    for a, b in C:

        if a + b == x:

            print((int(pow(b, 0.2)), -int(pow(a, 0.2))))

            break

        

        if b - a == x:

            print((int(pow(b, 0.2)), int(pow(a, 0.2))))

            break





if __name__ == "__main__":

    main()

from bisect import bisect_right
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def main():
    x = int(readline())
    A = [i**5 for i in range(10**6)]
    for b in A:
        a = x + b
        idx = bisect_right(A, a) - 1
        if A[idx] == a:
            print((int(pow(a, 0.2)), int(pow(b, 0.2))))
            break
        a = x - b
        idx = bisect_right(A, a) - 1
        if A[idx] == a:
            print((int(pow(a, 0.2)), -int(pow(b, 0.2))))
            break


if __name__ == "__main__":
    main()

from itertools import combinations_with_replacement
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def main():
    x = int(readline())
    ab = [i**5 for i in range(10**3)]
    C = combinations_with_replacement(ab, 2)
    for a, b in C:
        if a + b == x:
            print((int(pow(b, 0.2)), -int(pow(a, 0.2))))
            break
        if b - a == x:
            print((int(pow(b, 0.2)), int(pow(a, 0.2))))
            break


if __name__ == "__main__":
    main()

-from bisect import bisect_right +from itertools import combinations_with_replacement -    A = [i**5 for i in range(10**6)] -    for b in A: -        a = x + b -        idx = bisect_right(A, a) - 1 -        if A[idx] == a: -            print((int(pow(a, 0.2)), int(pow(b, 0.2)))) +    ab = [i**5 for i in range(10**3)] +    C = combinations_with_replacement(ab, 2) +    for a, b in C: +        if a + b == x: +            print((int(pow(b, 0.2)), -int(pow(a, 0.2)))) -        a = x - b -        idx = bisect_right(A, a) - 1 -        if A[idx] == a: -            print((int(pow(a, 0.2)), -int(pow(b, 0.2)))) +        if b - a == x: +            print((int(pow(b, 0.2)), int(pow(a, 0.2))))