#include <bits/stdc++.h>
using namespace std;
const int N = 205;
double pa[N], pb[N];
int max(int x, int y) { return x > y ? x : y; }
int main() {
  int ha, hb, da, db, la, lb, ra, rb, p1, p2, i, j, h, k, ta = 0, tb = 0;
  cin >> ha >> da >> la >> ra >> p1;
  cin >> hb >> db >> lb >> rb >> p2;
  if (p1 == 100) {
    puts("0");
    return 0;
  }
  if (p2 == 100) {
    puts("1");
    return 0;
  }
  double r = 0.0;
  pa[ha] = pb[hb] = 1.0;
  for (k = 0; k < 10000; k++) {
    if (ta <= tb) {
      tb -= ta;
      ta = da;
      pb[0] = 0.0;
      for (j = 1; j <= hb; j++)
        if (pb[j] > 1e-9) {
          double tp = pb[j] * (100 - p1) / 100 / (ra - la + 1);
          for (h = la; h <= ra; h++) pb[max(0, j - h)] += tp;
          pb[j] = pb[j] * p1 / 100;
        }
      r += (1.0 - pa[0]) * pb[0];
    } else {
      ta -= tb;
      tb = db;
      for (j = 1; j <= ha; j++)
        if (pa[j] > 1e-9) {
          double tp = pa[j] * (100 - p2) / 100 / (rb - lb + 1);
          for (h = lb; h <= rb; h++) pa[max(0, j - h)] += tp;
          pa[j] = pa[j] * p2 / 100;
        }
    }
  }
  printf("%.12lf\n", r);
  return 0;
}
