x=int(eval(input()))

for a in range(-200,200):

  for b in range(-200,200):

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

      print((a,b))

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

for a in range(200):

  for b in range(-200,a):

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

      print((a,b))

      exit()

x = int(eval(input()))
for a in range(-200, 200):
    for b in range(-200, 200):
        if a**5 - b**5 == x:
            print((a, b))
            exit()

x = int(eval(input()))
for a in range(200):
    for b in range(-200, a):
        if a**5 - b**5 == x:
            print((a, b))
            exit()

-for a in range(-200, 200): -    for b in range(-200, 200): +for a in range(200): +    for b in range(-200, a):