
const min = -100;
const max = 100;
const m = {};
for (let i = min; i <= max; i++) {
    m[i] = i**5;
}
// console.log(m);

const ans = {};
for (let i = min; i <= max; i++) {
    for (let k = min; k <= max; k++) {
        ans[m[i] - m[k]] = [i, k];
    }
}

const lines = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
const X = +lines[0];
console.log(`${ans[X][0]} ${ans[X][1]}`);
