Problem: Vasya plays the Power Defence. 

He must pass the last level of the game. In order to do this he must kill the Main Villain, who moves in a straight line at speed 1 meter per second from the point ( - ∞, 0) to the point ( + ∞, 0) of the game world. In the points (x, 1) and (x, - 1), where x is an integer number, Vasya can build towers of three types: fire-tower, electric-tower or freezing-tower. However, it is not allowed to build two towers at the same point. Towers of each type have a certain action radius and the value of damage per second (except freezing-tower). If at some point the Main Villain is in the range of action of k freezing towers then his speed is decreased by k + 1 times.

The allowed number of towers of each type is known. It is necessary to determine the maximum possible damage we can inflict on the Main Villain.

All distances in the problem are given in meters. The size of the Main Villain and the towers are so small, that they can be considered as points on the plane. The Main Villain is in the action radius of a tower if the distance between him and tower is less than or equal to the action radius of the tower.

Input

The first line contains three integer numbers nf, ne and ns — the maximum number of fire-towers, electric-towers and freezing-towers that can be built (0 ≤ nf, ne, ns ≤ 20, 1 ≤ nf + ne + ns ≤ 20). The numbers are separated with single spaces.

The second line contains three integer numbers rf, re and rs (1 ≤ rf, re, rs ≤ 1000) — the action radii of fire-towers, electric-towers and freezing-towers. The numbers are separated with single spaces.

The third line contains two integer numbers df and de (1 ≤ df, de ≤ 1000) — the damage a fire-tower and an electronic-tower can inflict on the Main Villain per second (in the case when the Main Villain is in the action radius of the tower). The numbers are separated with single space.

Output

Print the only real number — the maximum possible damage to the Main Villain with absolute or relative error not more than 10 - 6.

Examples

Input

1 0 0
10 10 10
100 100


Output

1989.97487421

Input

1 0 1
10 10 10
100 100


Output

3979.94974843

Note

In the first sample we've got one fire-tower that always inflicts the same damage, independently of its position. 

In the second sample we've got another freezing-tower of the same action radius. If we build the two towers opposite each other, then the Main Villain's speed will be two times lower, whenever he enters the fire-tower's action radius. That means that the enemy will be inflicted with twice more damage.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct arr {
  double d;
  int v;
  bool operator<(const arr &t) const { return d < t.d; }
} b[105], tmp[105];
int tot, b_size;
double r[105], ans;
int n[5], d[5], c[105];
int sum[105], cnt, N;
const int maxn = 105, maxm = 100008;
const double oo = 1e14;
struct Tedge {
  int start[maxn], tot;
  struct arr {
    int a, next, c;
    double d;
  } e[maxm];
  void clear(int n) {
    tot = 1;
    memset(start, 0, n + 1 << 2);
  }
  void add(int x, int y, int c, double d) {
    e[++tot].a = y;
    e[tot].next = start[x];
    start[x] = tot;
    e[tot].c = c;
    e[tot].d = d;
    e[++tot].a = x;
    e[tot].next = start[y];
    start[y] = tot;
    e[tot].c = 0;
    e[tot].d = -d;
  }
} E;
int S, T;
double flow, cost;
struct Value_Flow {
  int h[maxn << 2], pre[maxn];
  bool in[maxn];
  double dis[maxn];
  void addflow() {
    int tmp = 1;
    double sum = 0;
    for (int u = T; u != S; u = E.e[pre[u]].a)
      tmp = (tmp < E.e[pre[u] ^ 1].c ? tmp : E.e[pre[u] ^ 1].c),
      sum += E.e[pre[u] ^ 1].d;
    flow += tmp;
    cost += tmp * sum;
    for (int u = T; u != S; u = E.e[pre[u]].a) {
      E.e[pre[u] ^ 1].c -= tmp, E.e[pre[u]].c += tmp;
    }
  }
  bool findflow() {
    int l = 1, r = 1;
    for (int i = S; i <= T; i++) dis[i] = oo;
    h[1] = S;
    dis[S] = 0;
    in[S] = 1;
    memset(pre, 0, sizeof(pre));
    while (l <= r) {
      int u = h[l++];
      for (int i = E.start[u], v; v = E.e[i].a, i; i = E.e[i].next)
        if (E.e[i].c && dis[v] > dis[u] + E.e[i].d + 1e-8) {
          dis[v] = dis[u] + E.e[i].d;
          pre[v] = i ^ 1;
          if (!in[v]) {
            h[++r] = v;
            in[v] = 1;
            if (dis[h[l]] > dis[v]) swap(h[l], h[r]);
          }
        }
      in[u] = 0;
    }
    if (dis[T] >= oo) return 0;
    return 1;
  }
  void work() {
    flow = 0;
    cost = 0;
    while (findflow()) addflow();
  }
} Value_Flow;
struct Tprogram {
  void open() {
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
  }
  void close() {}
  void init() {
    scanf("%d%d%d", &n[1], &n[2], &n[3]);
    N = n[1] + n[2] + n[3] + 1;
    scanf("%lf%lf%lf", &r[1], &r[2], &r[3]);
    for (int i = 1; i <= 3; i++) r[i] = sqrt(r[i] * r[i] - 1 * 1);
    scanf("%d%d", &d[1], &d[2]);
  }
  void add(int d) {
    b[++b_size].d = d - r[3];
    b[b_size].v = 1;
    b[++b_size].d = d + r[3];
    b[b_size].v = -1;
  }
  void get_ans() {
    int m = b_size;
    for (int i = 1; i <= m; i++) tmp[i] = b[i];
    sort(tmp + 1, tmp + m + 1);
    tmp[0].d = -1e9, tmp[m + 1].d = 1e9;
    sum[0] = 1;
    for (int j = 1; j <= m + 1; j++) sum[j] = sum[j - 1] + tmp[j].v;
    S = 0;
    T = tot + 3;
    E.clear(T + 1);
    for (int i = 1; i <= tot; i++) {
      int p1, p2;
      for (int k = 1; k <= 2; k++) {
        double L = c[i] - r[k], R = c[i] + r[k], Sum = 0;
        for (int j = 0; j <= m + 1; j++) {
          if (j && tmp[j].d > L && tmp[j - 1].d <= L) p1 = j;
          if (j < m + 1 && tmp[j].d <= R && tmp[j + 1].d > R) p2 = j;
        }
        for (int j = p1; j <= p2 - 1; j++)
          Sum += sum[j] * (tmp[j + 1].d - tmp[j].d) * d[k];
        if (p1 <= p2)
          Sum += (tmp[p1].d - L) * sum[p1 - 1] * d[k],
              Sum += (R - tmp[p2].d) * sum[p2] * d[k];
        else
          Sum += (R - L) * sum[p2] * d[k];
        E.add(tot + k, i, 1, -Sum);
      }
      E.add(i, T, 1, 0);
    }
    E.add(S, tot + 1, n[1], 0);
    E.add(S, tot + 2, n[2], 0);
    Value_Flow.work();
    ans = (ans > -cost ? ans : -cost);
  }
  void Dfs(int d, int n) {
    if (d >= (N >> 1)) {
      if (!n) get_ans();
      return;
    }
    if (n >= 2) {
      add(d);
      add(d);
      Dfs(d + 1, n - 2);
      b_size -= 4;
    }
    if (n >= 1) {
      add(d);
      c[++tot] = d;
      Dfs(d + 1, n - 1);
      b_size -= 2;
      tot--;
    }
    c[++tot] = d;
    c[++tot] = d;
    Dfs(d + 1, n);
    tot--;
    tot--;
  }
  void work() {
    Dfs(0, n[3]);
    printf("%.10lf\n", ans);
  }
} Program;
int main() {
  Program.init();
  Program.work();
  return 0;
}