fun main(args: Array<String>) {
    var (a, b, c, d) = readLine()!!.split(" ").map(String::toLong)
    var ans=0L
    ans=Math.max(a*c,a*d)
    ans=Math.max(ans,b*c)
    ans=Math.max(ans,b*d)

    println(ans)
}