import bisect

import math



D = 120



X = int(eval(input()))



for a in range(-D, D):

    for b in range(-D-1, D-1):

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

            break

    else:

        continue

    break



print((a, b))

D = 120



X = int(eval(input()))



for a in range(-D, D):

    for b in range(-D-1, D-1):

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

            break

    else:

        continue

    break



print((a, b))

import bisect
import math

D = 120
X = int(eval(input()))
for a in range(-D, D):
    for b in range(-D - 1, D - 1):
        if a**5 - b**5 == X:
            break
    else:
        continue
    break
print((a, b))

D = 120
X = int(eval(input()))
for a in range(-D, D):
    for b in range(-D - 1, D - 1):
        if a**5 - b**5 == X:
            break
    else:
        continue
    break
print((a, b))

-import bisect -import math -