func readInt() -> Int {
    return Int(readLine()!)!
}

func mainD() {
    let X = readInt()

    let n = 1000

    for i in -n...n {
        for j in -n...n {
            let A = i * i * i * i * i
            let B = j * j * j * j * j

            if (A - B) == X {
                print(i, j)
                return
            }
        }
    }
}
mainD()