func main() {
    let ints = readInts()
    let a = ints[0]
    let b = ints[1]
    let c = ints[2]
    let d = ints[3]
    var arr: [Int] = []
    arr.append(a * c)
    arr.append(b * c)
    arr.append(a * d)
    arr.append(b * d)
    print(arr.sorted()[3])
}

main()

func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
