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

  if(a < 0 && b > 0 && c < 0 && d > 0){
    console.log(Math.max(a*c, a*d, b*c, b*d, 0))
  }else{
    console.log(Math.max(a*c, a*d, b*c, b*d))
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));