function Main(arg) {
  let a = Number(arg.trim().split(' ')[0]);
  let b = Number(arg.trim().split(' ')[1]);
  let c = Number(arg.trim().split(' ')[2]);
  let d = Number(arg.trim().split(' ')[3]);
  console.log(Math.max(a*c, a*d, b*c, b*d));
}

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