const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {

    const X = input - 0

    if (X === 0) {
        console.log('1 1')
        return
    }

    const dp = [0]

    let i = 0
    while (i < 10) {
        i++
        dp[i] = Math.pow(i, 5)
        for (let j = 0; j <= dp.length; j++) {
            let hit = -1
            if ((hit = dp.indexOf(X - dp[j])) !== -1) {
                console.log(hit + ' ' + -j)
                return
            }
            if ((hit = dp.indexOf(X + dp[j])) !== -1) {
                console.log(hit + ' ' + j)
                return
            }
        }
    }
    
})(input)
