#include using namespace std; int a, b, c, d; int main() { cin >> a >> b >> c >> d; int max = 0; if ( a * b + c * d > max ) max = a*b + c*d; if ( b * d + a * c > max ) max = a*c + b*d; if ( c * b + d * a > max ) max = a*d + c*b; cout << max; return 0; }