import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

def main():

    X = int(readline())

    for b in range(-1000, 1001):

        for a in range(b, 1001):

            if a**5 -b**5 == X:        

                A = a

                B = b

                break

    print((A, B))            

if __name__ == '__main__':

    main()
import sys

read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readlines = sys.stdin.buffer.readlines

from itertools import combinations

def main():

    X = int(readline())

    p = [int(i) for i in range(-1000, 1001)]

    for b, a in combinations(p, 2):

        if a**5 - b**5 == X:

            A = a

            B = b

            break

    print((A, B))

if __name__ == '__main__':

    main()
import sys

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


def main():
    X = int(readline())
    for b in range(-1000, 1001):
        for a in range(b, 1001):
            if a**5 - b**5 == X:
                A = a
                B = b
                break
    print((A, B))


if __name__ == "__main__":
    main()

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from itertools import combinations


def main():
    X = int(readline())
    p = [int(i) for i in range(-1000, 1001)]
    for b, a in combinations(p, 2):
        if a**5 - b**5 == X:
            A = a
            B = b
            break
    print((A, B))


if __name__ == "__main__":
    main()

+from itertools import combinations -    for b in range(-1000, 1001): -        for a in range(b, 1001): -            if a**5 - b**5 == X: -                A = a -                B = b -                break +    p = [int(i) for i in range(-1000, 1001)] +    for b, a in combinations(p, 2): +        if a**5 - b**5 == X: +            A = a +            B = b +            break