var Main  = function(input){
    var nums=input.split(" ").map((n)=>parseInt(n,10));
    var a = nums[0];
    var b = nums[1];
    var c = nums[2];
    var d = nums[3];
  
    var array=[];

    for (var i=a; i<=b; i++){
        for (var j=c; j<=d; j++){
            array.push(i*j);
        }

    }
    array.sort(function (x,y){return y-x;});
    console.log(array[0]);
};


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

