x = int(eval(input()))



for a in range(10**4):

    for b in range(10**4):

        if(a**5 + b**5 == x):

            print((a, -b))

            break

        elif(a**5 - b**5 == x):

            print((a, b))

            break

    else:

        continue

    break
x = int(eval(input()))



for a in range(10**3):

    for b in range(10**3):

        if(a**5 + b**5 == x):

            print((a, -b))

            break

        elif(a**5 - b**5 == x):

            print((a, b))

            break

    else:

        continue

    break

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

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

-for a in range(10**4): -    for b in range(10**4): +for a in range(10**3): +    for b in range(10**3):