x = int(eval(input()))



for a in range(-118,119):

  for b in range(-119,118):

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

      print((a,b))

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



for i in range(0, 120):

  for j in range(-119, 120):

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

      print((i,j))

      exit()

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

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

-for a in range(-118, 119): -    for b in range(-119, 118): -        if a**5 - b**5 == x: -            print((a, b)) +for i in range(0, 120): +    for j in range(-119, 120): +        if (i**5 - j**5) == x: +            print((i, j))