function Main(input) {
  // the first line is assigned to input[0], the second line is assigned to input[1] similarly.
  input = input.split("\n");
  const [a, b, c, d] = input[0].split(" ").map((x) => parseInt(x, 10));

  let max = a * c;
  for (let i = a; i <= b; i++) {
    for (let j = c; j <= d; j++) {
      max = Math.max(max, i * j);
    }
  }
  console.log(max);
}
// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
