x=int(eval(input()))

dic={}

for i in range(10**5):

  dic[i**5]=i

  dic[(-i)**5]=-i

for i in range(10**5):

    if i**5+x in dic:

      print((dic[i**5+x],i))

      break

    if (-i)**5+x in dic:

      print((dic[(-i)**5+x],-i))

      break
x=int(eval(input()))

for a in range(-118,120):

  for b in range(-119,119):

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

      print((a,b))

      exit()
x = int(eval(input()))
dic = {}
for i in range(10**5):
    dic[i**5] = i
    dic[(-i) ** 5] = -i
for i in range(10**5):
    if i**5 + x in dic:
        print((dic[i**5 + x], i))
        break
    if (-i) ** 5 + x in dic:
        print((dic[(-i) ** 5 + x], -i))
        break

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

-dic = {} -for i in range(10**5): -    dic[i**5] = i -    dic[(-i) ** 5] = -i -for i in range(10**5): -    if i**5 + x in dic: -        print((dic[i**5 + x], i)) -        break -    if (-i) ** 5 + x in dic: -        print((dic[(-i) ** 5 + x], -i)) -        break +for a in range(-118, 120): +    for b in range(-119, 119): +        if a**5 - b**5 == x: +            print((a, b)) +            exit()