fun main(args: Array<String>) {
    val (a, b, c, d) = getLongs()
    println(
            Math.max(Math.max(a * c, a * d), Math.max(b * c, b * d))
    )
}

fun getInt() = readLine()!!.toInt()
fun getInts() = readLine()!!.split(" ").map { it.toInt() }
fun getLong() = readLine()!!.toLong()
fun getLongs() = readLine()!!.split(" ").map { it.toLong() }