fun main(args : Array<String>) {
    val x = readLine()!!.toInt()

    for (a in -1000..1000) {
        for (b in -1000..1000) {
            val a5 = Math.pow(a.toDouble(), 5.0).toLong()
            val b5 = Math.pow(b.toDouble(), 5.0).toLong()

            if (a5 - b5 == x.toLong()) {
                println("$a $b")
                return
            }
        }
    }
}
