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