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

func main1() {
    let param = readInts()
    
    var ans = param[1] * param[3]
    
    for x in param[0]...param[1] {
        for y in param[2]...param[3] {
            if (x * y) > ans {
                ans = x * y
            }
        }
    }
    
    print(ans)
}

main1()