"use strict";

function main(input){
  const args = input.trim().split(' ').map(_=>parseInt(_, 10));
  const rects = [args[0]*args[1], args[2]*args[3]].sort((a,b)=>{return a-b;});
  console.log(rects[1]);
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));  