"use strict";
    
// 固有の素因数の発見（多分高速）
const getUniqueFactorsFor = num => {
  let results = [1];

  for(let i=2; i*i<=num; i++) {
      if(num % i === 0) {
          results.push(i);
          
          while(num%i === 0) {
            num /= i;
          }
      }
  }

  if(num !== 1) {
    results.push(num);
  }

  return results;
}

const main = arg => {
    arg = arg.trim().split("\n");
    const X = parseInt(arg[0].split(" ")[0]);
    
    const factors = getUniqueFactorsFor(X);
    const N = factors.length;
    
    for(let i=0; i<N; i++) {
        for(let j=0; j<factors[i]; j++) {
            const a = j;
            const b = - (factors[i] - a);
            
            // console.log("a:" + a);
            // console.log("b:" + b);
            
            let formula = (a - b) * (Math.pow(a, 4) + Math.pow(a, 3) * b + Math.pow(a, 2) * Math.pow(b, 2) + a * Math.pow(b, 3) + Math.pow(b, 4));
            
            if(formula === X) {
                console.log(a + " " + b);
                return;
            }
        }
    }
    
    console.log(factors.length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));