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

function main() {
    let X = +cin.shift();
    let s = 0;
    while (true) {
        for (let a = 0; a <= s; a++) {
            let b = s - a;
            let ma = -a;
            let mb = -b;
            if (a ** 5 - b ** 5 == X) {
                console.log(a, b);
                return;
            }
            if (a ** 5 - mb ** 5 == X) {
                console.log(a, mb);
                return;
            }
            if (ma ** 5 - b ** 5 == X) {
                console.log(ma, b);
                return;
            }
            if (ma ** 5 - mb ** 5 == X) {
                console.log(ma, mb);
                return;
            }
        }
        s++;
    }
}
main();
