function Main(input) {
	input = input.split(' ').map(e=>Number(e))
  	let list1 = []
    let list2 = []
    let result = []
    for(let i = input[0];i<=input[1];i++){
    	for(let j = input[2];j<=input[3];j++){
    		result.push(i*j)
    	}
    }
  console.log(Math.max(...result))
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));