#include <bits/stdc++.h>
using namespace std;
double z[2][7200][305] = {0};
double s[2][7200][305] = {0};
int main() {
  int i = 0, g = 0, dd = 0, lx[1024] = {0}, x = 0, y = 0, xx = 0, yy = 0, j = 0,
      k = 0, hp[2] = {0}, dt[2] = {0}, ll[2] = {0}, rr[2] = {0}, pp[2] = {0};
  double p[2] = {0}, ans = 0;
  while (true) {
    for (i = 0; i < 2; i++) {
      scanf("%d%d%d%d%d", hp + i, dt + i, ll + i, rr + i, pp + i);
      p[i] = (100 - pp[i]) * .01;
    }
    if (pp[0] == 100) {
      printf("%.12lf\n", 0.);
      break;
    }
    if (pp[1] == 100) {
      printf("%.12lf\n", 1.);
      break;
    }
    memset(z, 0, sizeof(z));
    memset(s, 0, sizeof(s));
    for (i = 0; i < 2; i++) {
      x = i;
      y = !i;
      z[x][0][hp[y]] = 1.;
      for (k = hp[y]; k >= 0; k--) {
        s[x][0][k] = s[x][0][k + 1] + z[x][0][k];
      }
      for (j = 1; j < 7100; j++) {
        for (k = 1; k <= ll[x]; k++) {
          z[x][j][0] += z[x][j - 1][k] * p[x];
        }
        for (k = ll[x] + 1; k <= rr[x]; k++) {
          z[x][j][0] += z[x][j - 1][k] * p[x] *
                        (1. - (k - ll[x]) * 1. / (rr[x] - ll[x] + 1));
        }
        z[x][j][0] += z[x][j - 1][0];
        for (k = 1; k <= hp[y]; k++) {
          z[x][j][k] =
              p[x] * (s[x][j - 1][k + ll[x]] - s[x][j - 1][k + rr[x] + 1]) *
                  1. / (rr[x] - ll[x] + 1) +
              z[x][j - 1][k] * (1. - p[x]);
        }
        for (k = hp[y]; k >= 0; k--) {
          s[x][j][k] = s[x][j][k + 1] + z[x][j][k];
        }
      }
    }
    g = 0;
    dd = dt[0] * dt[1];
    for (i = 0; i < dd; i++) {
      x = 0;
      if (i % dt[0] == 0) {
        x |= 1;
      }
      if (i % dt[1] == 0) {
        x |= 2;
      }
      if (x) {
        lx[g++] = x;
      }
    }
    x = y = 0;
    ans = 0.;
    for (i = 0; i < 7000; i++) {
      xx = x;
      yy = y;
      if (lx[i % g] & 1) {
        x++;
      }
      if (lx[i % g] & 2) {
        y++;
      }
      if (x > xx) {
        ans += (z[0][x][0] - z[0][x - 1][0]) * (1. - z[1][yy][0]);
      }
    }
    printf("%.12lf\n", ans);
    break;
  }
  return 0;
}
