x = int(eval(input()))



for a in range(-118, 120):

    for b in range(-118, 120):

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

            print((a, b))

            exit()
x = int(eval(input()))



for a in range(-118, 120):

    for b in range(-119, 118):

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

            print((a, b))

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

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

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