function Main(input){
const newInput = input.split(" ")
const a = parseInt(newInput[0])
const b = parseInt(newInput[1])
const c = parseInt(newInput[2])
const d = parseInt(newInput[3])

let answer=0;
let max=-Infinity
  
for(let i = a; i <= b; i++){
  for (let j = c; j <= d; j++){
    answer = i * j;
    if(answer > max){
      max = answer;
      }
    }
  }
  console.log(max)

}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));