import math

def main():

  x = int(eval(input()))

  for i in range(-120,120):

    for j in range(-120,120):

      if math.pow(i, 5) - math.pow(j, 5) == x:

        print((str(i) + ' ' + str(j)))

        return

main()
import math

def main():

  x = int(eval(input()))

  for i in range(-118,120):

    for j in range(-119,129):

      if math.pow(i, 5) - math.pow(j, 5) == x:

        print((str(i) + ' ' + str(j)))

        return

main()
import math


def main():
    x = int(eval(input()))
    for i in range(-120, 120):
        for j in range(-120, 120):
            if math.pow(i, 5) - math.pow(j, 5) == x:
                print((str(i) + " " + str(j)))
                return


main()

import math


def main():
    x = int(eval(input()))
    for i in range(-118, 120):
        for j in range(-119, 129):
            if math.pow(i, 5) - math.pow(j, 5) == x:
                print((str(i) + " " + str(j)))
                return


main()

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