fun main() {
    val x = readLine()!!.toLong()
    for (a in 0L..1000L) {
        for (b in -a until a) {
            if ((a * a * a * a * a) - (b * b * b * b * b) == x) {
                println("$a $b")
                return
            }
        }
    }
}