X = int(eval(input()))



for A in range(1000):

    for B in range(-500, 500):

        if A**5-B**5 == X:

            print((A, B))

            exit()

x = int(eval(input()))

for a in range(120):

    for b in range(-120, 120):

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

            print((a, b))

            exit(0)

X = int(eval(input()))
for A in range(1000):
    for B in range(-500, 500):
        if A**5 - B**5 == X:
            print((A, B))
            exit()

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

-X = int(eval(input())) -for A in range(1000): -    for B in range(-500, 500): -        if A**5 - B**5 == X: -            print((A, B)) -            exit() +x = int(eval(input())) +for a in range(120): +    for b in range(-120, 120): +        if a**5 - b**5 == x: +            print((a, b)) +            exit(0)