"use strict";

const main = arg => {
    const input = arg.trim().split("\n");

    const x = parseInt(input[0]);
    for(let a = -118; a<= 119; a++){
        for(let b = -118; b<= 119; b++){
            let tmp = a*a*a*a*a - b*b*b*b*b
            if(x === tmp){
                console.log(`${a} ${b}`)
            }
        } 
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  