import Foundation
func toTuple<T>(_ args: [T]) -> (T, T, T, T) { (args[0], args[1], args[2], args[3]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }

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