"use strict";

const input = require("fs").readFileSync("/dev/stdin", "utf8");
const X = Number(input.trim());

const memo = {};
const pow5 = (n) => {
  if (!memo[n]) {
    memo[n] = Math.pow(n, 5);
  }
  return memo[n];
};

const MAX = 120;
const resultList = [];
for (let a = -MAX; a <= MAX; a++) {
  for (let b = -MAX; b < MAX; b++) {
    if (pow5(a) - pow5(b) === X) {
      resultList.push(a, b);
      break;
    }
  }
  if (resultList.length) {
    break;
  }
}

console.log(resultList.join(" "));
