#include <bits/stdc++.h>
using namespace std;
template <class _T>
inline _T sqr(const _T& x) {
  return x * x;
}
template <class _T>
inline string toStr(const _T& a) {
  ostringstream os("");
  os << a;
  return os.str();
}
const long double PI = 3.1415926535897932384626433832795;
const long double EPS = 1e-11;
const int MAX_SHOTS = 5200;
const int MAX_HP = 256;
struct Tank {
  int hp, t, l, r, make_pair;
};
Tank a[2];
long double p[2][MAX_SHOTS][MAX_HP];
void calc(long double p[MAX_SHOTS][MAX_HP], int hp, int l, int r,
          long double make_pair) {
  p[0][hp] = 1;
  for (int i = 0; i < int(MAX_SHOTS - 1); i++) {
    for (int j = int(1); j <= int(hp); j++) {
      if (p[i][j] < EPS) continue;
      p[i + 1][j] += p[i][j] * make_pair;
      for (int k = int(l); k <= int(r); k++) {
        p[i + 1][max(j - k, 0)] += p[i][j] * (1 - make_pair) / (r - l + 1);
      }
    }
  }
}
int main() {
  cout << setiosflags(ios::fixed) << setprecision(10);
  for (int i = 0; i < int(2); i++) {
    cin >> a[i].hp >> a[i].t >> a[i].l >> a[i].r >> a[i].make_pair;
  }
  if (a[0].make_pair == 100) {
    cout << 0;
  } else if (a[1].make_pair == 100) {
    cout << 1;
  } else {
    memset((p), 0, sizeof(p));
    calc(p[0], a[0].hp, a[1].l, a[1].r, a[1].make_pair / 100.0);
    calc(p[1], a[1].hp, a[0].l, a[0].r, a[0].make_pair / 100.0);
    long double sum = 0;
    for (int i = 0; i < int(MAX_SHOTS - 1); i++) {
      int oppoShots = i == 0 ? 0 : (i * a[0].t - 1) / a[1].t + 1;
      if (oppoShots >= MAX_SHOTS) break;
      for (int j = int(1); j <= int(a[0].hp); j++) {
        sum += p[0][oppoShots][j] * p[1][i + 1][0];
      }
    }
    cout << sum;
  }
  return 0;
}
