fun main(){
    val x = readLine()!!.split(" ").map { it.toInt() }[0]
    var a = 0
    var b = 0
    var kotaeA = 0
    var kotaeB = 0
    var xx = 0
    for (i in -120 until 120){
        a = i
        for (j in -120 until 120){
            b = j
            xx = (a * a * a * a * a) - (b * b * b * b * b)
            if (xx == x) {
                kotaeA = a
                kotaeB = b
                break
            }
        }
    }
    println("${kotaeA} ${kotaeB}")
}