function max(inputs) {
	return Math.max(...[+inputs[0]*+inputs[2],+inputs[0]*+inputs[3],+inputs[1]*+inputs[2],+inputs[1]*+inputs[3]])
}

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