#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
const double PI = 3.14159265358;
const int inf = (int)1e9;
const int MAX_N = 5000;
int hp1, dt1, l1, r1;
int hp2, dt2, l2, r2;
double p1, p2;
double dp1[MAX_N][222];
double dp2[MAX_N][222];
void rec(double dp[][222], int hp, int l, int r, double p) {
  dp[0][hp] = 1;
  for (int shot = 0; shot < MAX_N - 1; shot++) {
    for (int hit = 0; hit <= hp; hit++) {
      if (dp[shot][hit] > eps) {
        dp[shot + 1][hit] += (1 - p) * dp[shot][hit];
        for (int i = l; i <= r; i++) {
          dp[shot + 1][max(hit - i, 0)] += p * dp[shot][hit] / (r - l + 1);
          if (dp[shot][hit] > 1) {
            int asdf = 1341;
          }
        }
      }
    }
  }
}
void cal() {
  double ans = dp2[1][0];
  for (int k = 2; k < MAX_N; k++) {
    int kp = ((k - 1) * dt1) / dt2;
    if (((k - 1) * dt1) % dt2 == 0) kp--;
    kp++;
    if (kp >= MAX_N) break;
    if (dp2[k][0] > 1) {
      int adsf = 1334;
    }
    ans += (1 - dp1[kp][0]) * (dp2[k][0] - dp2[k - 1][0]);
  }
  printf("%.10f\n", ans);
}
int main() {
  cin >> hp1 >> dt1 >> l1 >> r1 >> p1;
  cin >> hp2 >> dt2 >> l2 >> r2 >> p2;
  p1 = 100 - p1;
  p2 = 100 - p2;
  p1 /= 100;
  p2 /= 100;
  if (abs(p2 - 0) < eps && p1 > eps) {
    cout << "1" << endl;
    return 0;
  }
  rec(dp1, hp1, l2, r2, p2);
  rec(dp2, hp2, l1, r1, p1);
  cal();
  return 0;
}
