#include <bits/stdc++.h>
using namespace std;
const int maxh = 201;
double p[2][maxh], ans[2];
double l[2], r[2], d[2], lp[2];
double t[2], cp[2];
int h[2];
void done(int o) {
  t[o] += d[o];
  for (int i = 1; i <= h[o ^ 1]; ++i) {
    if (p[o ^ 1][i] < 1e-10) continue;
    for (int j = l[o]; j <= r[o]; ++j) {
      p[o ^ 1][max(0, i - j)] += p[o ^ 1][i] * lp[o];
    }
    p[o ^ 1][i] *= cp[o] * 0.01;
  }
  ans[o] += (1 - p[o][0]) * p[o ^ 1][0];
  if (o == 0) p[1][0] = 0.0;
}
int main() {
  for (int i = 0; i < 2; ++i) {
    cin >> h[i] >> d[i] >> l[i] >> r[i] >> cp[i];
    if (cp[i] == 100) {
      printf("%.12lf\n", i * 1.0);
      return 0;
    }
    p[i][h[i]] = 1.0;
    lp[i] = 1.0 / (r[i] - l[i] + 1) * (1.0 - cp[i] * 0.01);
  }
  for (int cc = 0; cc < 1e4; ++cc) {
    done(t[0] > t[1]);
  }
  printf("%.12lf\n", ans[0]);
  return 0;
}
