"use strict"

function Main(input) {
  let lines = input.split('\n');
  const [a, b, c, d] = lines[0].split(' ').map(BigInt);

  let product_matrix = [];
  product_matrix.push(a * c);
  product_matrix.push(a * d);
  product_matrix.push(b * c);
  product_matrix.push(b * d);
  const max = product_matrix.reduce((a,b)=>a>b?a:b)

  console.log(max);
}

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