const input = require("fs").readFileSync("/dev/stdin", "utf8")

const lines = input.split('\n')
let [a, b, c, d] = lines[0].split(' ').map(BigInt)

function max () {
    let res = arguments[0]
    for (var i = 1; i < arguments.length; i++) {
        res = res > arguments[i] ? res : arguments[i]
    }
    return res
}

console.log(max(a * c, a * d, b * c, b * d).toString())
