function Main(input) {

	// 1行目がinput[0], 2行目がinput[1], …に入る
	input = input.split("\n");
    
    let [a,b,c,d] = input[0].split(" ").map(BigInt);
    
    let ac = a * c;
    let ad = a * d;
    let bc = b * c;
    let bd = b * d;
    
    let max = [ac,ad,bc,bd].sort()[3];
    
    if (max < 0) {
        if ((a < 0 && b > 0) || (a > 0 && b < 0)) max = 0;
        if ((c < 0 && d > 0) || (c > 0 && d < 0)) max = 0;
    }
    
    console.log(Number(max));
    
}

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