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++){
    	list1.push(i)
    }
	for(let i = input[2];i<=input[3];i++){
    	list2.push(i)
    }
  	
  	list1.forEach(e=>{
    	list2.forEach(f=>{
        	result.push(e*f)
        })
    })
  console.log(Math.max(...result))
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));