x=int(eval(input()))



for i in range(2*10**3):

  for j in range(0,i,1):

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

      print((i,j))

      exit()



for i in range(0,70,1):

  for j in range(0,-70,-1):

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

      print((i,j))

      exit()
x=int(eval(input()))



for i in range(-200,200,1):

  for j in range(-200,200,1):

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

      print((i,j))

      exit()
x = int(eval(input()))
for i in range(2 * 10**3):
    for j in range(0, i, 1):
        if i**5 - j**5 == x:
            print((i, j))
            exit()
for i in range(0, 70, 1):
    for j in range(0, -70, -1):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

x = int(eval(input()))
for i in range(-200, 200, 1):
    for j in range(-200, 200, 1):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

-for i in range(2 * 10**3): -    for j in range(0, i, 1): +for i in range(-200, 200, 1): +    for j in range(-200, 200, 1): -for i in range(0, 70, 1): -    for j in range(0, -70, -1): -        if i**5 - j**5 == x: -            print((i, j)) -            exit()