import numpy as np

x=int(eval(input()))

#ａ⁵－ｂ⁵＝(ａ－ｂ)(ａ⁴＋ａ³ｂ＋ａ²ｂ²＋ａｂ³＋ｂ⁴)

def make_divisors(n):

    divisors = []

    for i in range(1, int(n**0.5)+1):

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n//i)

    return divisors

d=make_divisors(x)

for i in range(len(d)):

  d.append(-d[i])

flag=False



for i in d:

  if flag==True:

    break

  tui=x//i

  ans=np.roots([5,10*i,10*i**2,5*i**3,i**4-tui])

  for j in ans:

    if flag==True:

      break

    if j.imag==0:

      a=i+round(j.real)

    if a**5-(round(j.real))**5==x:

      print((int(a),int(round(j.real))))

      flag=True

      break
x=int(eval(input()))

flag=True

for i in range(-118,120):

  if flag==False:

    break

  for j in range(-119,119):

    if x==(i**5-j**5):

      print((i,j))

      flag=False

      break
import numpy as np

x = int(eval(input()))
# ａ⁵－ｂ⁵＝(ａ－ｂ)(ａ⁴＋ａ³ｂ＋ａ²ｂ²＋ａｂ³＋ｂ⁴)
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    return divisors


d = make_divisors(x)
for i in range(len(d)):
    d.append(-d[i])
flag = False
for i in d:
    if flag == True:
        break
    tui = x // i
    ans = np.roots([5, 10 * i, 10 * i**2, 5 * i**3, i**4 - tui])
    for j in ans:
        if flag == True:
            break
        if j.imag == 0:
            a = i + round(j.real)
        if a**5 - (round(j.real)) ** 5 == x:
            print((int(a), int(round(j.real))))
            flag = True
            break

x = int(eval(input()))
flag = True
for i in range(-118, 120):
    if flag == False:
        break
    for j in range(-119, 119):
        if x == (i**5 - j**5):
            print((i, j))
            flag = False
            break

-import numpy as np - -# ａ⁵－ｂ⁵＝(ａ－ｂ)(ａ⁴＋ａ³ｂ＋ａ²ｂ²＋ａｂ³＋ｂ⁴) -def make_divisors(n): -    divisors = [] -    for i in range(1, int(n**0.5) + 1): -        if n % i == 0: -            divisors.append(i) -            if i != n // i: -                divisors.append(n // i) -    return divisors - - -d = make_divisors(x) -for i in range(len(d)): -    d.append(-d[i]) -flag = False -for i in d: -    if flag == True: +flag = True +for i in range(-118, 120): +    if flag == False: -    tui = x // i -    ans = np.roots([5, 10 * i, 10 * i**2, 5 * i**3, i**4 - tui]) -    for j in ans: -        if flag == True: +    for j in range(-119, 119): +        if x == (i**5 - j**5): +            print((i, j)) +            flag = False -        if j.imag == 0: -            a = i + round(j.real) -        if a**5 - (round(j.real)) ** 5 == x: -            print((int(a), int(round(j.real)))) -            flag = True -            break