#include int main() { int a,b,c,d, maxim; scanf("%d", &a); scanf("%d", &b); scanf("%d", &c); scanf("%d", &d); maxim = -1; if(a*b + c*d > maxim) maxim = a*b + c *d; if(a*c + b*d > maxim) maxim = a*c + b *d; if(a*d + c*b > maxim) maxim = a*d + c *b; printf("%d", maxim); return 0; }