#include using namespace std; int a,b,c,d,maxx; int main() { scanf ("%d %d %d %d",&a,&b,&c,&d); maxx = 0; if (a*b+c*d > maxx) maxx = a*b+c*d; if (a*c+b*d > maxx) maxx = a*c+b*d; if (a*d+c*b > maxx) maxx = a*d+c*b; printf ("%d\n",maxx); return 0; }