x = int(eval(input()))



for i in range(-4000,4000) :

    flag = 0

    for j in range(-4000,i) :

        if x%(i-j) != 0 :

            continue

        v = x//(i-j)

        c = i**4+j**4+i*j*(i**2+i*j+j**2)

        if v == c :

            print((i,j))

            flag = 1

            break

    if flag == 1 :

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



for i in range(-1000,1000) :

    flag = 0

    for j in range(-1000,i) :

        if x%(i-j) != 0 :

            continue

        v = x//(i-j)

        c = i**4+j**4+i*j*(i**2+i*j+j**2)

        if v == c :

            print((i,j))

            flag = 1

            break

    if flag == 1 :

        break
x = int(eval(input()))
for i in range(-4000, 4000):
    flag = 0
    for j in range(-4000, i):
        if x % (i - j) != 0:
            continue
        v = x // (i - j)
        c = i**4 + j**4 + i * j * (i**2 + i * j + j**2)
        if v == c:
            print((i, j))
            flag = 1
            break
    if flag == 1:
        break

x = int(eval(input()))
for i in range(-1000, 1000):
    flag = 0
    for j in range(-1000, i):
        if x % (i - j) != 0:
            continue
        v = x // (i - j)
        c = i**4 + j**4 + i * j * (i**2 + i * j + j**2)
        if v == c:
            print((i, j))
            flag = 1
            break
    if flag == 1:
        break

-for i in range(-4000, 4000): +for i in range(-1000, 1000): -    for j in range(-4000, i): +    for j in range(-1000, i):