#include #include using namespace std; int main() { int vect[4]; cin >> vect[0] >> vect[1] >> vect[2] >> vect[3]; sort(vect, vect + 4); cout << vect[0] * vect[1] + vect[2] * vect[3]; system("pause"); return 0; }