function Main(input) {
  input = input.trim();
  var N = parseInt(input, 10);
  var maxN = 0;
  var n = 10;
  var A = 0;
  var B = 0;
  while (true) {
    n_1 = Math.pow(n, 5);
    n_2 = Math.pow(n - 1, 5);
    if (n_1 - n_2 > Math.pow(10, 9)) {
      maxN = n + 5;
      break;
    }
    n++;
  }

  for (var i = -maxN; i < maxN; i++) {
    for (var j = -maxN; j < maxN; j++) {
      var a = Math.pow(i, 5);
      var b = Math.pow(j, 5);
      if (a - b == N) {
        A = a;
        B = b;
        console.log(A, " ", B);
        return;
      }
    }
  }
}

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