function prod(input) {
	input = input.split(" ").map(Number);
	const arr1 = [input[0],input[1]]
    const arr2 = [input[2],input[3]];
  	let x = 0, y = 0;
  	let asc1 = arr1.sort((a,b) => a-b);
  	let dsc1 = arr1.sort((a,b) => b-a);
  	let asc2 = arr2.sort((a,b) => a-b);
  	let dsc2 = arr2.sort((a,b) => b-a);
	let mul1 = asc1[0] * asc2[0];
	let mul2 = asc1[0] * asc2[1];
  	let mul3 = asc1[1] * asc2[0];
  	let mul4 = asc1[1] * asc2[1];
	let res = [mul1,mul2,mul3,mul4].sort((a,b) => b - a);
	return res[0];
}

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