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 count=null;

    for (var i=a; i<=b; i++){
        for (var j=c; j<=d; j++){
            if (count=null) count=i*j
            else if (count<=i*j)count = i*j
        }

    }
    console.log(count);
};


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

