fun main(args: Array<String>) {
    val x = readLine()!!.toDouble()
    val nearest = x.pow(0.2)
    var i = 0
    while (true) {
        val bigger = ceil(nearest + i)
        val biggerP5 = bigger.pow(5)
        val diff1 = floor((biggerP5 - x).pow(0.2))
        if (biggerP5 - diff1.pow(5) == x) {
            println("${bigger.toInt()} ${diff1.toInt()}")
            return
        }

        val smaller = floor(nearest - i)
        val smallerP5 = smaller.pow(5)
        val diff2 = floor((x - smallerP5).pow(0.2))
        if (smallerP5 + diff2.pow(5) == x) {
            println("${smaller.toInt()} ${-diff2.toInt()}")
            return
        }

        i++
    }
}

fun Double.pow(x: Double) = Math.pow(this, x)
fun Double.pow(x: Int) = Math.pow(this, x.toDouble())
fun ceil(x: Double) = Math.ceil(x)
fun floor(x: Double) = Math.floor(x)