Program spell;
Var a,b,c,d,s1,s2,s3,max:integer;
Begin
 readln(a,b,c,d);
 s1:=a * b + c * d;
 s2:=a * c + b * d;
 s3:=b * c + a * d;
 max:=0;
 if s1 > max then max:=s1;
 if s2 > max then max:=s2;
 if s3 > max then max:=s3;
 writeln(max);
 readln;
End.