import Foundation

let line = readLine()!.components(separatedBy: " ")
let a = Int(line[0])!
let b = Int(line[1])!
let c = Int(line[2])!
let d = Int(line[3])!
var m: Int = a * c
m = max(m, a * d)
m = max(m, b * c)
m = max(m, b * d)
print(m)