function main(input) {
  const x = BigInt(input[0]);
  let power5 = [];
  const width = ((x<100)?x:Math.floor(Math.power(x,5)));

  for(let i=-width;i<width;i++){
    power5[i+width]=BigInt(i*i*i*i*i);
  }
  let judge = false;
  for(let i=-width;i<width;i++){
    for(let j=-width;j<width;j++){
      if((power5[i+width]-power5[j+width])===x){
        console.log(i + " " + j);
        judge = true;
        break;
      }
    }
    if(judge){
      break;
    }
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8').trim().split("\n"));