#include <bits/stdc++.h>
using namespace std;
long long A, B, C, X, Y;
int main() {
  cin >> A >> B >> C >> X >> Y;
  long long p = min(A + B, C * 2);
  long long q = min(C * 2, A);
  long long r = min(C * 2, B);
  long long cost = 0;
  if (X >= Y) {
    cost = p * Y + q * (Y - X);
  } else {
    cost += p * X;
    cost += r * (X - Y);
  }
  cout << p << endl;
  cout << q << endl;
  cout << r << endl;
  cout << cost << endl;
  return 0;
}
