'use script';

{
function Main(input) {
	//input = input.split("\n");
	tmp = input.split(" ");
	const a = parseInt(tmp[0], 10);
	const b = parseInt(tmp[1], 10);
	const c = parseInt(tmp[2], 10);
	const d = parseInt(tmp[3], 10);

  	let max = a*c;
  
	if(max < a*d){
      max = a*d;
    }
	if(max < b*c){
      max = b*c;
    }
  	if(max < b*d){
      max = b*d;
    }
  
  	console.log(max.toString());
  
	}

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

}