function main(a){
	a = stn(a.split(" "));
	var ss=[];
	ss.push(a[0]*a[1]);
	ss.push(a[2]*a[3]);
	ss.sort(function(a,b){return a-b;});
	console.log(ss[1]);
}
function stn(a){
		return a.map(function(x){return parseInt(x,10);});
}
main(require("fs").readFileSync("/dev/stdin", "utf8"));