x=int(eval(input()))

for i in range(-118,120):

  for j in range(-119,129):

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

      print((i,j))

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

for i in range(120):

  for j in range(-119,129):

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

      print((i, j))

      exit()
x = int(eval(input()))
for i in range(-118, 120):
    for j in range(-119, 129):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

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

-for i in range(-118, 120): +for i in range(120):