'use strict';

const inputs = require('fs').readFileSync('/dev/stdin', 'utf8').split('\n');
const input = parseInt(inputs[0], 10);

let A = 0;
let B = 0;
for (;;) {
  A += 2;
  B -= 2;

  if (calc(A, B) === input) {
    console.log(A, B);
    return;
  }

  if (calc(A, B) >= input) {
    break;
  }
}

for (;;) {
  if (calc(A - 1, B) === input) {
    console.log(A - 1, B);
    return;
  }

  if (calc(A, B + 1) === input) {
    console.log(A, B + 1);
    return;
  }

  --A;
  ++B;

  if (calc(A, B) === input) {
    console.log(A, B);
    return;
  }
}

function calc(value1, value2) {
  return value1 ** 5 - value2 ** 5;
}