"use strict";
const Main = input => {
    const x = parseInt(input, 10);
    let ra = 0;
    let rb = 0;
    loop: for(let b = -x; b < x; b++) {
        for(let a = b; a < x; a++) {
            const p1 = a - b;
            if(x % p1 !== 0) return;

            const p2 = a**4 + (a**3)*b + (a**2)*(b**2) + a*(b**3) + b**4;
            if(p1 * p2 === x) {
                ra = a;
                rb = b;

                break loop;
            }
        }
    }

    console.log(`${ra} ${rb}`)
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8"));