x=int(eval(input()))

for a in range(999):

  for b in range(-99,999):

    if a**5-b**5==x: print((a,b)); exit()
x=int(eval(input()))

for a in range(120):

  for b in range(-99,a):

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

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

-for a in range(999): -    for b in range(-99, 999): +for a in range(120): +    for b in range(-99, a):