#include using namespace std ; int main() { int v[ 5 ] ; int i ; for ( i = 0 ; i < 4 ; i ++ ) cin >> v [ i ] ; int m1 = v[0]*v[1] + v[2]*v[3] ; int m2 = v[0]*v[3] + v[1]*v[2] ; int m3 = v[1]*v[3] + v[0]*v[2] ; if( m1 > m2 ) { if(m1 > m3) cout << m1 << endl ; else cout << m3 << endl ; } else { if( m2 > m3 ) cout << m2 << endl ; else cout << m3 << endl ; } return 0 ; }