#include <bits/stdc++.h>
using namespace std;
static const double EPS = 1e-8;
double dp[2][10010][302];
void calcp(int l, int r, int p, int ahp, int idx) {
  memset(dp[idx], 0, sizeof(dp[idx]));
  dp[idx][0][ahp] = 1;
  for (int t = 0; t < 10000; t++) {
    double sum[302] = {dp[idx][t][0]};
    for (int h = 1; h <= ahp + r - l; h++) sum[h] = sum[h - 1] + dp[idx][t][h];
    for (int h = 1; h <= ahp + r - l; h++) {
      dp[idx][t + 1][h] += dp[idx][t][h] * (p / 100.);
      dp[idx][t + 1][max(0, h - r)] +=
          (sum[h] - (h - r + l > 0 ? sum[h - r + l - 1] : sum[0])) *
          ((1. / (r - l + 1)) * (100. - p) / 100.);
    }
  }
}
int main() {
  istream &fin = cin;
  ostream &fout = cout;
  FILE *fpin = stdin;
  FILE *fpout = stdout;
  int hp1, dt1, l1, r1, p1;
  fin >> hp1 >> dt1 >> l1 >> r1 >> p1;
  int hp2, dt2, l2, r2, p2;
  fin >> hp2 >> dt2 >> l2 >> r2 >> p2;
  calcp(l1, r1, p1, hp2, 0);
  calcp(l2, r2, p2, hp1, 1);
  for (int t = 1; t <= 10000; t++) {
    dp[1][t][0] += dp[1][t - 1][0];
  }
  double res = 0;
  for (int t = 1; t <= 10000; t++) {
    int at = ((t - 1) * dt1) / dt2 + 1;
    if (((t - 1) * dt1) % dt2 == 0) at--;
    at = max(0, at);
    at = min(at, 10000);
    res += dp[0][t][0] * (1 - dp[1][at][0]);
  }
  fout << fixed << setprecision(15) << res << endl;
}
