#include <bits/stdc++.h>
void swap(int *, int *);
int main() {
  int a, b, ab, x, y, out = 0;
  scanf("%d", &a);
  scanf("%d", &b);
  scanf("%d", &ab);
  scanf("%d", &x);
  scanf("%d", &y);
  if (x > y) {
    swap(&a, &b);
    swap(&x, &y);
  }
  printf("%d %d %d %d\n", a, b, x, y);
  out += x * ab * 2;
  printf("%d\n", out);
  if (y - x) {
    out += (ab * 2 < b) ? (y - x) * ab * 2 : (y - x) * b;
  }
  printf("%d\n", out);
  if (out > a * x + b * y) out = a * x + b * y;
  printf("%d\n", out);
}
void swap(int *a, int *b) {
  int c = *a;
  *a = *b;
  *b = c;
}
