#include <bits/stdc++.h>
using namespace std;
const int maxhp = 200, maxt = 5000;
long double live1[maxt + 1], live2[maxt + 1];
void Solve1(long double *live, int hp, int l, int r, int p) {
  static long double f[maxt + 1][maxhp + 1];
  fill(f[0], f[0] + hp + 1, 0);
  f[0][hp] = 1;
  long double tmp = (100 - p) / (100.0 * (r - l + 1));
  long double tmp2 = p / 100.0;
  for (int i = 1; i <= maxt; ++i) {
    fill(f[i], f[i] + hp + 1, 0);
    for (int j = 0; j <= hp; ++j) {
      for (int k = l; k <= r; ++k) {
        f[i][max(j - k, 0)] += f[i - 1][j] * tmp;
      }
      f[i][j] += f[i - 1][j] * tmp2;
    }
  }
  for (int i = 0; i <= maxt; ++i) {
    live[i] = 1 - f[i][0];
  }
}
int main(void) {
  int hp1, dt1, l1, r1, p1;
  int hp2, dt2, l2, r2, p2;
  scanf("%d%d%d%d%d", &hp1, &dt1, &l1, &r1, &p1);
  scanf("%d%d%d%d%d", &hp2, &dt2, &l2, &r2, &p2);
  if (p1 == 100) {
    puts("0");
    return 0;
  } else if (p2 == 100) {
    puts("1");
    return 0;
  }
  Solve1(live1, hp1, l2, r2, p2);
  Solve1(live2, hp2, l1, r1, p1);
  long double win = 0;
  int cnt1 = 0, cnt2 = 0;
  for (int time = 0;; ++time) {
    if (time % dt1 == 0) {
      win += live1[cnt2] * ((1 - live2[cnt1 + 1]) - (1 - live2[cnt1]));
      ++cnt1;
    }
    if (time % dt2 == 0) {
      ++cnt2;
    }
    if (cnt1 >= maxt || cnt2 >= maxt) break;
  }
  printf("%.10lf\n", (double)win);
  return 0;
}
