#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
double dp[222][222][66];
bool first[66];
int hp[2], d[2], l[2], r[2], pp[2];
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int main() {
  for (int i = 0; i < 2; i++) cin >> hp[i] >> d[i] >> l[i] >> r[i] >> pp[i];
  if (pp[0] == 100) {
    printf("0.00000000000\n");
    return 0;
  }
  if (pp[1] == 100) {
    printf("1.00000000000\n");
    return 0;
  }
  double p[2] = {pp[0] / 100.0, pp[1] / 100.0};
  int g = gcd(d[1], d[0]);
  int lc = d[1] / g * d[0];
  int tot = 0;
  for (int i = 0; i < lc; ++i) {
    if (i % d[0] == 0) first[tot++] = false;
    if (i % d[1] == 0) first[tot++] = true;
  }
  double len[2] = {1.0 / (r[0] - l[0] + 1), 1.0 / (r[1] - l[1] + 1)};
  for (int i = 1; i <= hp[0]; ++i)
    for (int j = 1; j <= hp[1]; ++j) {
      for (int k = 0; k < tot; k++) {
        if (!first[k]) {
          dp[i][j][k] = 0;
          for (int next = l[0]; next <= r[0]; ++next)
            if (j - next <= 0)
              dp[i][j][k] += 1.0 * len[0];
            else
              dp[i][j][k] += dp[i][j - next][(k + 1) % tot] * 1.0 * len[0];
          dp[i][j][k] *= (1.0 - p[0]);
        } else {
          dp[i][j][k] = 0;
          for (int next = l[1]; next <= r[1]; ++next)
            if (i - next > 0)
              dp[i][j][k] += dp[i - next][j][(k + 1) % tot] * 1.0 * len[1];
          dp[i][j][k] *= (1.0 - p[1]);
        }
      }
      double prod = 1.0;
      for (int k = 1; k < tot; ++k) {
        if (!first[k - 1]) {
          prod *= p[0];
          dp[i][j][0] += dp[i][j][k] * prod;
        } else {
          prod *= p[1];
          dp[i][j][0] += dp[i][j][k] * prod;
        }
      }
      prod *= p[first[tot - 1]];
      dp[i][j][0] /= 1 - prod;
      for (int k = tot - 1; k > 0; --k)
        dp[i][j][k] += dp[i][j][(k + 1) % tot] * p[first[k]];
    }
  printf("%.10f\n", dp[hp[0]][hp[1]][0]);
  return 0;
}
