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(120):

  for j in range(-119, i):

    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(120):
    for j in range(-119, i):
        if i**5 - j**5 == x:
            print((i, j))
            exit()

-    for j in range(-119, 129): +    for j in range(-119, i):