"use strict";

const main = arg => {
    arg = arg.trim().split("\n");
    const X = parseInt(arg[0].split(" ")[0]);
    
    for(let i=-200; i<200; i++) {
        for(let j=-200; j<200; j++) {
            if(Math.pow(i, 5) - Math.pow(j, 5) === X) {
                console.log(i + " " + j);
                return;
            }
        }
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
