#include <bits/stdc++.h>
int compare_int(const void *a, const void *b) {
  return *(long long *)a - *(long long *)b;
}
int min_comp(int min, int a) {}
int max_comp(int max, int a) {
  if (max > a)
    return max;
  else
    return a;
}
int main() {
  int A, B, C, X, Y;
  int m[101] = {};
  int min;
  int i, j;
  int cnt = 0;
  int temp = 0;
  scanf("%d %d %d %d %d", &A, &B, &C, &X, &Y);
  if ((A + B) >= (2 * C)) {
    if (X < Y) {
      cnt = X * 2 * C;
      printf("0 %d\n", cnt);
      if (B < (2 * C))
        cnt = cnt + ((Y - X) * B);
      else
        cnt = cnt + ((Y - X) * 2 * C);
      printf("0 %d\n", cnt);
    } else {
      cnt = Y * 2 * C;
      if (A < (2 * C))
        cnt = cnt + ((X - Y) * A);
      else
        cnt = cnt + ((X - Y) * 2 * C);
      printf("1 %d\n", cnt);
    }
  } else {
    cnt = (A * X) + (B * Y);
    printf("2 %d\n", cnt);
  }
  printf("%d\n", cnt);
  return 0;
}
