fun longList() = readLine()?.split(" ")?.map(String::toLong) ?: TODO()
fun main() {
    val (a, b, c, d) = longList()
    listOf(
        a * c,
        b * c,
        a * d,
        b * d
    ).max()?.let {
        println(it.toString())
    }
}