import java.math.*;
import java.util.*;
import java.io.*;
 
public class apples_aa_java implements Runnable {
 
    public BufferedReader in;
    public StringTokenizer stoken = new StringTokenizer("");
    public PrintWriter out;
 
    public static void main(String[] args) throws IOException {
    	new Thread(null, new apples_aa_java(), "", (1 << 25)).start();
    }   
        
    public void run() {
    	try {
    		in = new BufferedReader(new InputStreamReader(System.in));
    		out = new PrintWriter(System.out);
    		solve();
    	} catch (Exception e) {
    		throw new RuntimeException(e);
    	} finally {
    		out.close();
    	}
    }
        
        private void solve() throws IOException{
        	long a = nextLong(), b = nextLong(), m = nextLong(), n = nextLong();
        	out.print(Math.max(a * m, b * n));
        }
     
        private long nextLong() throws NumberFormatException, IOException {
            return Long.parseLong(nextString());
        }
        private String nextString() throws IOException {
            while(!stoken.hasMoreTokens()){
                String st = in.readLine();
                stoken = new StringTokenizer(st);
            }
            return stoken.nextToken();
        }
     
    }  