#include using namespace std; int main() { int v[5]; for (int i = 1; i <= 4; ++i) scanf ("%d", &v[i]); int rez = v[1]*v[2] + v[3]*v[4]; int rez2 = v[1]*v[3] + v[2]*v[4]; int rez3 = v[1]*v[4] + v[2]*v[3]; if (rez < rez2) rez = rez2; if (rez < rez3) rez = rez3; printf ("%d", rez); return 0; }