const Main = (input) => {
  const[A,B,C,D] = input.split(' ').map(Number);
  let numbers = [];
  for(let i = A; i <= B; i++) {
    for(let j = C; j <= D; j++) {
      numbers.push(i*j);
    }
  }
  console.log(Math.max.apply(null, numbers));
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
// Main(`-1000000000 0 -1000000000 0`);
