    public fun readln() = readLine()!!
    public fun readlnByte() = readln().toByte()
    public fun readlnShort() = readln().toShort()
    public fun readlnInt() = readln().toInt()
    public fun readlnLong() = readln().toLong()
    public fun readlnFloat() = readln().toFloat()
    public fun readlnDouble() = readln().toDouble()
    public fun readlnBigInt(radix: Int = 10) = readln().toBigInteger(radix)
    public fun readlnBigDecimal() = readln().toBigDecimal()
     
    public fun lineSequence(limit: Int = Int.MAX_VALUE) = generateSequence { readLine() }.constrainOnce().take(limit)
    public fun readlnStrings() = readln().split(' ')
    public fun readlnBytes() = readlnStrings().map { it.toByte() }
    public fun readlnShorts() = readlnStrings().map { it.toShort() }
    public fun readlnInts() = readlnStrings().map { it.toInt() }
    public fun readlnLongs() = readlnStrings().map { it.toLong() }
    fun main() {
        val (a, b, c, d) = readlnLongs()
        val max = listOf(a*c, a*d, b*c, b*d).max()
        println("%d".format(max))
    }