fun main() {
    val x = readLine()!!.toDouble()
    var a = 1.0
    var b = 0.0

    while (true) {
        val comp = Math.pow(b, 5.0) + x
        val compa = Math.pow(a, 5.0)
        if (comp == compa) {
            println("${a.toInt().toString()} ${b.toInt().toString()}")
            return
        } else if (comp < compa) {
            a++
            b = a - 1
        } else {
            b--
        }
    }

}

