"use strict"
function main(arg) {
    let X = Number(arg.trim().split("\n")[0])
    let list = []
    for (let i = 0; i < 50000; i++) {
        let a = Math.pow(i , 5)
        list.push(a)
        if (a > Math.pow(10, 9)) {
            break
        }
        // console.log(Math.pow(i , 5))
    }
    let finish = false
    for (let i = 0; i < list.length; i++ ) {
        let A = list[i]
        // +
        for (let j = 0; j < list.length; j++) {
            let B = list[j]
            if (A - B === X) {
                console.log([i, j].join(" "))
                finish = true
                break
            }
            if (j > 0) {
                let _B = list[j - 1]
                if (Math.abs(X - (A - B)) > Math.abs(X - (A - _B))) {
                    break
                }
            }
        }
        if (finish) return
        // -
        for (let j = 0; j < list.length; j++) {
            let B = list[j] * -1
            if (A - B === X) {
                console.log([i, j * -1].join(" "))
                finish = true
                break
            }
            if (j > 0) {
                let _B = list[j - 1] * -1
                if (Math.abs(X - (A - B)) > Math.abs(X - (A - _B))) {
                    break
                }
            }
        }
        if (finish) return
    }
    // console.log()
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));