x = int(eval(input()))



pow5 = [i ** 5 for i in range(-1000, 1000)]



for a in range(-1000, 1000):

  for b in range(-1000, 1000):

    if pow5[a + 1000] - pow5[b + 1000] == x:

      print(f"{a} {b}")

      exit(0)

x = int(eval(input()))



pow5 = [(i, i ** 5) for i in range(-1000, 1000)]



for a, a5 in pow5:

  for b, b5 in pow5:

    if a5 - b5 == x:

      print(f"{a} {b}")

      exit(0)

x = int(eval(input()))
pow5 = [i**5 for i in range(-1000, 1000)]
for a in range(-1000, 1000):
    for b in range(-1000, 1000):
        if pow5[a + 1000] - pow5[b + 1000] == x:
            print(f"{a} {b}")
            exit(0)

x = int(eval(input()))
pow5 = [(i, i**5) for i in range(-1000, 1000)]
for a, a5 in pow5:
    for b, b5 in pow5:
        if a5 - b5 == x:
            print(f"{a} {b}")
            exit(0)

-pow5 = [i**5 for i in range(-1000, 1000)] -for a in range(-1000, 1000): -    for b in range(-1000, 1000): -        if pow5[a + 1000] - pow5[b + 1000] == x: +pow5 = [(i, i**5) for i in range(-1000, 1000)] +for a, a5 in pow5: +    for b, b5 in pow5: +        if a5 - b5 == x: