#include using namespace std; int main() { int i,j,aux, v[4],x; for(i=1;i<=4;i++) cin>>v[i]; for (i = 0; i <= 4; i++) { for (j = 1; j <= 4; j++) { if (v [i] < v [j]) { aux = v [i]; v [i] = v [j]; v [j] = aux; } } } x=(v[1]*v[2])+(v[3]*v[4]); cout<