#include <bits/stdc++.h>
using namespace std;
int i, j, k, n, m, num;
int hpa, dta, la, ra, hpb, dtb, lb, rb, xa, xb;
int c[70], F[70], g[70], ff[70];
double pa, pb, f[210][210][70], a[70], b[70], g1[210][210][70],
    g2[210][210][70], an[70], a1[70], a2[70];
vector<int> huan, e[70];
void dfs(int x) {
  g[++*g] = x;
  F[x] = num;
  int A = c[x];
  if (F[A] == num) {
    int v;
    for (; (v = g[*g]) != A; (*g)--) {
      huan.push_back(v);
      ff[v] = num;
    }
    huan.push_back(A);
    ff[A] = num;
    return;
  }
  dfs(A);
}
void Dfs(int x) {
  int i;
  F[x] = num;
  for (i = 0; i < e[x].size(); i++) {
    int A = e[x][i];
    if (ff[A] == num) continue;
    an[A] = a[A] * an[x] + b[A];
    Dfs(A);
  }
}
inline void work() {
  long double A = 1, B = 0;
  int i;
  for (i = 0; i < huan.size(); i++) {
    int t = huan[i];
    A *= a[t];
    B = B * a[t] + b[t];
    a1[t] = A, a2[t] = B;
  }
  long double x = B / (1 - A);
  for (i = 0; i < huan.size(); i++) {
    int t = huan[i];
    an[t] = a1[t] * x + a2[t];
  }
}
int main() {
  scanf("%d%d%d%d%lf", &hpa, &dta, &la, &ra, &pa);
  scanf("%d%d%d%d%lf", &hpb, &dtb, &lb, &rb, &pb);
  pa /= 100;
  pb /= 100;
  if (pa == 1) {
    printf("0\n");
    return 0;
  }
  if (pb == 1) {
    printf("1\n");
    return 0;
  }
  for (xa = 1; xa <= hpa; xa++)
    for (xb = 1; xb <= hpb; xb++) {
      for (i = 0; i <= 60; i++) {
        int A = i - 30;
        if (A <= 0) {
          c[i] = i + dta;
          a[i] = pa;
          b[i] = g1[xa][max(0, xb - la)][i + dta] -
                 g1[xa][max(0, xb - ra - 1)][i + dta];
          b[i] += max(0, ra - xb + 1) - max(0, la - xb);
          b[i] = b[i] / (ra - la + 1) * (1 - pa);
        } else {
          c[i] = i - dtb;
          a[i] = pb;
          b[i] = g2[max(0, xa - lb)][xb][i - dtb] -
                 g2[max(0, xa - rb - 1)][xb][i - dtb];
          b[i] = b[i] / (rb - lb + 1) * (1 - pb);
        }
      }
      for (i = 0; i <= 60; i++) e[i].clear();
      for (i = 0; i <= 60; i++) e[c[i]].push_back(i);
      ++num;
      for (i = 0; i <= 60; i++)
        if (F[i] != num) {
          huan.clear();
          *g = 0;
          dfs(i);
          work();
          for (j = 0; j < huan.size(); j++) {
            int A = huan[j];
            Dfs(A);
          }
        }
      for (i = 0; i <= 60; i++) f[xa][xb][i] = an[i];
      for (i = 0; i <= 60; i++) {
        g1[xa][xb][i] = g1[xa][xb - 1][i] + f[xa][xb][i];
        g2[xa][xb][i] = g2[xa - 1][xb][i] + f[xa][xb][i];
      }
    }
  printf("%.12lf\n", f[hpa][hpb][30]);
  return 0;
}
