
function Main(input) {
    input = input.trim();    
    X = parseInt(input);


    const array = []

    for (var i = 0; i < 10000; i++) {
        array.push(Math.pow(i, 5))
    }

    var A = 0;
    var B = 0;

    var breakFlag = false;
    for (var i = 0; i < array.length; i++) {
        for (var j = i; j < array.length; j++) {
            if (array[i] + array[j] == X) {
                A = i
                B = j
            }
            if (array[i] - array[j] == X) {
                A = i
                B = -j
            }
            if (-array[i] + array[j] == X) {
                A = -i
                B = j
            }
            if (-array[i] - array[j] == X) {
                A = -i
                B = -j
            }
        }
        if (breakFlag) break;
    }

    console.log(A + " " + B)

}

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