# -*- coding: utf-8 -*-

import sys



X = int(input().strip())

#-----



for a in range(-118,120):

    for b in range(-118,120):

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

            print((a,b))

            sys.exit()

# -*- coding: utf-8 -*-

import sys



X = int(input().strip())

#-----

calc = {}



for i in range(-118,120):

    calc[i] = i**5





for a in range(-118,120):

    for b in range(-118,120):

        if (calc[a] - calc[b]) == X:

            print((a,b))

            sys.exit()

# -*- coding: utf-8 -*-
import sys

X = int(input().strip())
# -----
for a in range(-118, 120):
    for b in range(-118, 120):
        if (a**5 - b**5) == X:
            print((a, b))
            sys.exit()

# -*- coding: utf-8 -*-
import sys

X = int(input().strip())
# -----
calc = {}
for i in range(-118, 120):
    calc[i] = i**5
for a in range(-118, 120):
    for b in range(-118, 120):
        if (calc[a] - calc[b]) == X:
            print((a, b))
            sys.exit()

+calc = {} +for i in range(-118, 120): +    calc[i] = i**5 -        if (a**5 - b**5) == X: +        if (calc[a] - calc[b]) == X: