import sys

x = int(eval(input()))

for i in range(-200, 200):

  for j in range(-200, 200):

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

      print((i,j))

      sys.exit()
import sys

def main():

 x = int(eval(input()))

 for i in range(-200, 200):

   for j in range(-200, 200):

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

       print((i,j))

       sys.exit()

if __name__ == "__main__":

    main()
import sys

x = int(eval(input()))
for i in range(-200, 200):
    for j in range(-200, 200):
        if i**5 - j**5 == x:
            print((i, j))
            sys.exit()

import sys


def main():
    x = int(eval(input()))
    for i in range(-200, 200):
        for j in range(-200, 200):
            if i**5 - j**5 == x:
                print((i, j))
                sys.exit()


if __name__ == "__main__":
    main()

-x = int(eval(input())) -for i in range(-200, 200): -    for j in range(-200, 200): -        if i**5 - j**5 == x: -            print((i, j)) -            sys.exit() + +def main(): +    x = int(eval(input())) +    for i in range(-200, 200): +        for j in range(-200, 200): +            if i**5 - j**5 == x: +                print((i, j)) +                sys.exit() + + +if __name__ == "__main__": +    main()