function Main(input) {
    var inArray = input.split(' ')

    var a = parseInt(inArray[0]);
    var b = parseInt(inArray[1]);
    var c = parseInt(inArray[2]);
    var d = parseInt(inArray[3]);
    
    var x = 0;
    var y = 0;

    if (0 <= a && 0 <= c)  {
        console.log(b * d);
    } else if (0 > b && 0 > d ) {
        console.log(a * c);
    } else if ( 0 > a && 0 <= b && 0 > c && 0 <= d) {
        var r = (a * c ) < (b * d) ? (b * d) : (a * c);
        
        console.log(r)
     }  else if ( 0 >= b && 0 <= c ) {
         console.log(b * c );
     } else if (0 <= a && 0 >= d) {
         console.log(a * d );
     } 

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