x = int(eval(input()))

for a in range(-500, 500):

    for b in range(-500, 500):

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

            print((a, b))

            break

    else:

        continue

    break

import math



x = int(eval(input()))

for i in range(1, 121):

    for j in range(-120, 121):

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

            print((i, j))

            quit(0)

x = int(eval(input()))
for a in range(-500, 500):
    for b in range(-500, 500):
        if a**5 - b**5 == x:
            print((a, b))
            break
    else:
        continue
    break

import math

x = int(eval(input()))
for i in range(1, 121):
    for j in range(-120, 121):
        if i**5 - j**5 == x:
            print((i, j))
            quit(0)

+import math + -for a in range(-500, 500): -    for b in range(-500, 500): -        if a**5 - b**5 == x: -            print((a, b)) -            break -    else: -        continue -    break +for i in range(1, 121): +    for j in range(-120, 121): +        if i**5 - j**5 == x: +            print((i, j)) +            quit(0)