#include <bits/stdc++.h>
#pragma GCC optimize("Ofast", "unroll-loops", "omit-frame-pointer", "inline")
#pragma GCC option("arch=native", "tune=native", "no-zero-upper")
#pragma GCC target("avx2")
#pragma GCC optimize("03")
using namespace std;
vector<double> up(vector<double> &app, int l, int r, int p) {
  vector<double> ac(app.size() + 1);
  for (int i = 0; i < app.size(); i++) ac[i + 1] = ac[i] + app[i];
  double p1 = ((100.0 - (double)p) / 100.0);
  double p2 = p1 * (1.0 / (double)(r - l + 1));
  vector<double> res(app.size());
  double sum = 0;
  for (int i = 1; i < app.size(); i++) {
    int li = i + l;
    int ri = i + r;
    res[i] += (1.0 - p1) * app[i];
    if (li < app.size()) {
      ri = min(ri, (int)app.size() - 1);
      double sum = ac[ri + 1] - ac[li];
      res[i] += (sum * p2);
    }
    sum += res[i];
  }
  res[0] = 1.0 - sum;
  return res;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int hp1, t1, l1, r1, p1;
  cin >> hp1 >> t1 >> l1 >> r1 >> p1;
  int hp2, t2, l2, r2, p2;
  cin >> hp2 >> t2 >> l2 >> r2 >> p2;
  if (p1 == 100) {
    cout << (0) << '\n';
    return 0;
  }
  if (p2 == 100) {
    cout << (1.0) << '\n';
    return 0;
  }
  vector<double> pl1(hp1 + 1);
  vector<double> pl2(hp2 + 1);
  pl1[hp1] = 1;
  pl2[hp2] = 1;
  double x1 = 0;
  for (int i = 0; 1; i++) {
    if (!(i % t1)) {
      double plini = pl2[0];
      pl2 = up(pl2, l1, r1, p1);
      x1 += (pl2[0] - plini) * (1 - pl1[0]);
    }
    if (!(i % t2)) {
      double plini = pl1[0];
      pl1 = up(pl1, l2, r2, p2);
    }
    if (fabs(1 - pl1[0]) < 1e-6 || fabs(1 - pl2[0]) < 1e-6) break;
  }
  cout.precision(10);
  cout << fixed;
  cout << (x1) << '\n';
  return 0;
}
