import Foundation

let line = readLine()!.components(separatedBy: " ")
let a = Double(line[0])!
let b = Double(line[1])!
let c = Double(line[2])!
let d = Double(line[3])!

var m: Double = a * c
m = max(m, a * d)
m = max(m, b * c)
m = max(m, b * d)
print(Int(m))