"use strict";
var input = require("fs").readFileSync("/dev/stdin", "utf8");
var cin = input.trim().split(/ |\n/), cid = 0;

function main() {
    let X = +cin.shift();
    for (let a = -120; a < 120; a++) {
        for (let b = -120; b < 120; b++) {
            if (a ** 5 - b ** 5 == X) {
                console.log(a, b);
                return;
            }
        }
    }
}
main();
