import Foundation

func main() {
 let inputString = readLine()!
 let split: [Int] = inputString.components(separatedBy: " ").map{Int(String($0))!}
 
 let minA = split[0]
 let maxA = split[1]
 let minB = split[2]
 let maxB = split[3]
 
 let minAminB = minA * minB
 let minAmaxB = minA * maxB
 let maxAminB = maxA * minB
 let maxAmaxB = maxA * maxB
  
 var kekka =  minAminB < minAmaxB
 var res:Int = kekka ? minAmaxB:minAminB
 kekka = res < maxAminB
 res = kekka ? maxAminB:res
 kekka = res < maxAmaxB
 res = kekka ? maxAmaxB:res
 print(res)
}

main()