import sys

read = sys.stdin.read

readlines = sys.stdin.readlines

import numpy as np

def main():

    x = int(eval(input()))

    for i1 in range(-201, 201):

        for i2 in range(-201, 201):

            if i1**5 - i2**5 == x:

                print((i1, i2))

                sys.exit()



if __name__ == '__main__':

    main()
import sys

read = sys.stdin.read

readlines = sys.stdin.readlines

import numpy as np

from itertools import product

def main():

    x = int(input())

    n5 = [i**5 for i in range(201)]



    c = product(n5, repeat=2)

    for ce in c:

        if ce[0] + ce[1] == x:

            r = (int(ce[0]**0.2), int(ce[1]**0.2)* -1)

            break

        elif ce[0] - ce[1] == x:

            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))

            break

    print(*r, sep=' ')



if __name__ == '__main__':

    main()

import sys

read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np


def main():
    x = int(eval(input()))
    for i1 in range(-201, 201):
        for i2 in range(-201, 201):
            if i1**5 - i2**5 == x:
                print((i1, i2))
                sys.exit()


if __name__ == "__main__":
    main()

import sys

read = sys.stdin.read
readlines = sys.stdin.readlines
import numpy as np
from itertools import product


def main():
    x = int(input())
    n5 = [i**5 for i in range(201)]
    c = product(n5, repeat=2)
    for ce in c:
        if ce[0] + ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2) * -1)
            break
        elif ce[0] - ce[1] == x:
            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2))
            break
    print(*r, sep=" ")


if __name__ == "__main__":
    main()

+from itertools import product -    x = int(eval(input())) -    for i1 in range(-201, 201): -        for i2 in range(-201, 201): -            if i1**5 - i2**5 == x: -                print((i1, i2)) -                sys.exit() +    x = int(input()) +    n5 = [i**5 for i in range(201)] +    c = product(n5, repeat=2) +    for ce in c: +        if ce[0] + ce[1] == x: +            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2) * -1) +            break +        elif ce[0] - ce[1] == x: +            r = (int(ce[0] ** 0.2), int(ce[1] ** 0.2)) +            break +    print(*r, sep=" ")