x = int(eval(input()))



for a in range(1000):

    for b in range(-1000,1000):

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

            print((a,b))

            exit()
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()))
for a in range(1000):
    for b in range(-1000, 1000):
        if a**5 - b**5 == x:
            print((a, b))
            exit()

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()

-for a in range(1000): -    for b in range(-1000, 1000): +for a in range(-118, 120): +    for b in range(-119, 119):