let input = readLine()!
    .split(separator: " ")
    .compactMap { Int($0)! }

let a = input[0]
let b = input[1]
let c = input[2]
let d = input[3]

let result = [
    a * c,
    a * d,
    b * c,
    b * d,
].max()!
print(result)
