#include <bits/stdc++.h>
int max(int a, int b) {
  if (a > b)
    return a;
  else
    return b;
}
int min(int a, int b) {
  if (a < b)
    return a;
  else
    return b;
}
int main() {
  int a, b, c, x, y;
  scanf("%d %d %d %d %d", &a, &b, &c, &x, &y);
  int pay_a = 0;
  int pay_b = 0;
  int pay_c = 0;
  int pay = 0;
  pay_a = a * x + b * y;
  if (x > y) {
    pay_b = 2 * c * y + a * (x - y);
  } else {
    pay_b = 2 * c * x + b * (y - x);
  }
  pay_c = 2 * c * max(x, y);
  printf("%d %d %d", pay_a, pay_b, pay_c);
  pay = min(pay_a, pay_b);
  pay = min(pay, pay_c);
  printf("%d", pay);
  return 0;
}
