function prod(nums) {
	let input = nums.split(' ').map(BigInt);
  	let prod1 = BignInt(input[0] * input[2]);
	let prod2 = BigInt(input[1] * input[3]);
  	let prod3 = BigInt(input[0] * input[3]);
  	let prod4 = BigInt(input[1] * input[2]);
	let res = [prod1, prod2,prod3, prod4].sort((a, b) => (a > b) ? -1 : ((a < b) ? 1 : 0));
	return res[0];
}
 
console.log(prod(require("fs").readFileSync("/dev/stdin", "utf8")));
