X = int(eval(input()))

for A in range(-200, 200):

    for B in range(-200, 200):

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

            print((A, B))

            break

    else:

        continue

    break
X = int(eval(input()))

for A in range(-150, 150):

    for B in range(-150, 150):

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

            print((A, B))

            break

    else:

        continue

    break
X = int(eval(input()))
for A in range(-200, 200):
    for B in range(-200, 200):
        if A**5 - B**5 == X:
            print((A, B))
            break
    else:
        continue
    break

X = int(eval(input()))
for A in range(-150, 150):
    for B in range(-150, 150):
        if A**5 - B**5 == X:
            print((A, B))
            break
    else:
        continue
    break

-for A in range(-200, 200): -    for B in range(-200, 200): +for A in range(-150, 150): +    for B in range(-150, 150):