function prod(nums) {
	let input = nums.split(' ').map(Number);
  	let prod1 = input[0] * input[2];
	let prod2 = input[1] * input[3];
	return prod1 > prod2 ? prod1 : prod2;
}

console.log(prod(require("fs").readFileSync("/dev/stdin", "utf8")));
