function max(inputs) {
  	const p1 = Number(inputs[0]*inputs[2]); 
  	const p2 = Number(inputs[0]*inputs[3]);
  	const p3 = Number(inputs[1]*inputs[2]);
  	const p4 = Number(inputs[1]*inputs[3]);
	return Math.max(...[p1,p2,p3,p4]);
}

console.log(max(require('fs').readFileSync("/dev/stdin", "utf8"));
