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;
int nf, ne, ns, rf, re, rs, df, de, tower[20];
pair<double, double> tf[10], te[10], ts[10];
bool check[20];
double cross(const pair<double, double> &a, const pair<double, double> &b) {
  if (max(a.first, b.first) > min(a.second, b.second)) return 0;
  return min(a.second, b.second) - max(a.first, b.first);
}
double solve() {
  double sum = 0;
  sum += nf * df * sqrt(rf * rf - 1) * 2;
  sum += ne * de * sqrt(re * re - 1) * 2;
  vector<double> L;
  for (int i = 0; i < nf + ne + ns; i++)
    if (!check[i]) {
      double T1 = 0, T2 = 0;
      for (int j = 0; j < ns; j++) {
        T1 += cross(tf[i / 2], ts[tower[j] / 2]) * df;
        T2 += cross(te[i / 2], ts[tower[j] / 2]) * de;
      }
      sum += T1;
      L.push_back(T2 - T1);
    }
  sort(L.begin(), L.end());
  for (int i = nf; i < nf + ne; i++) sum += L[i];
  return sum;
}
void dfs(int cur, int tot, double &ans) {
  if (tot == ns) ans = max(ans, solve());
  if (cur == nf + ne + ns) return;
  dfs(cur + 1, tot, ans);
  check[cur] = true;
  tower[tot] = cur;
  dfs(cur + 1, tot + 1, ans);
  check[cur] = false;
}
int main() {
  scanf("%d%d%d", &nf, &ne, &ns);
  scanf("%d%d%d", &rf, &re, &rs);
  scanf("%d%d", &df, &de);
  for (int i = 0; i <= (nf + ne + ns - 1) / 2; i++) {
    tf[i] = make_pair(i - sqrt(rf * rf - 1), i + sqrt(rf * rf - 1));
    te[i] = make_pair(i - sqrt(re * re - 1), i + sqrt(re * re - 1));
    ts[i] = make_pair(i - sqrt(rs * rs - 1), i + sqrt(rs * rs - 1));
  }
  double ans = 0;
  memset(check, false, sizeof(check));
  dfs(0, 0, ans);
  printf("%.8lf\n", ans);
  return 0;
}