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