import kotlin.math.*
import java.util.*
import java.io.*

fun main() {
    val (a,b,c,d) = readLine()!!.split(" ").map { it.toLong() }
    var x:Long = a*c
    if(x < a*d){
        x = a*d
    }
    if(x < b*c){
        x = b*c
    }
    if(x < b*d){
        x = b*d
    }
    println(x)
}