fun main() {
    val x = readLine()!!.toLong()

    fun pow5(num: Int): Long{
        var tmp = num.toLong()
        repeat(5-1) {
            tmp *= num
        }
        return tmp
    }

    for (i in 1..120) {
        val a = pow5(i)
        for (j in -120..120) {
            val b = pow5(j)
            if (a - b == x) {
                println("$i $j")
                return
            }
        }
    }
}



