"use strict"

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

  let product_matrix = [];
  for ( let x = a; x <= b; x++ ) {
    for (  let y = c; y <= d; y++ ) {
      product_matrix.push(x * y);
    }
  }
  product_matrix.sort(function(a, b) {
    return b - a;
  });

  console.log(product_matrix[0]);

  return;
}

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