function Main(input) {
  var X = parseInt(input.trim(), 10);
  var A,B;
  var A = 0;
  var flag = true;
  while (Math.pow(A, 5) <= X){
    B = Math.round(Math.pow((X - Math.pow(A, 5)), 1/5));
    //console.log("B", B);
    if ((Math.pow(A, 5) + Math.pow(B, 5)) === X){
      flag = false;
      B *= -1;
      break; 
    }
    A ++;
  }
  if (flag) B = 1;
  while (flag){
    while ((Math.pow(A, 5) - Math.pow(B, 5)) > X) {
      B ++;
    } 
    if ((Math.pow(A, 5) - Math.pow(B, 5)) === X) {
      break;
    } else {
      A ++;
    }
  }
  console.log("%d %d",A, B);
}   

Main(require("fs").readFileSync("/dev/stdin", "utf8"));