#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000, MAXHP = 200;
double tank1[MAXN + 1][MAXHP + 1], tank2[MAXN + 1][MAXHP + 1];
double tanksum[MAXHP + 1];
int hp1, pp1, l1, r1, p1;
int hp2, pp2, l2, r2, p2;
int max(int x, int y) { return x > y ? x : y; }
int min(int x, int y) { return x < y ? x : y; }
int main() {
  scanf("%d%d%d%d%d", &hp1, &pp1, &l1, &r1, &p1);
  scanf("%d%d%d%d%d", &hp2, &pp2, &l2, &r2, &p2);
  tank1[0][hp2] = 1;
  tank2[0][hp1] = 1;
  for (int i = 1; i <= MAXN; ++i) {
    memset(tanksum, 0, sizeof(tanksum));
    tanksum[0] = tank1[i - 1][0];
    for (int j = 1; j <= hp2; ++j)
      tanksum[j] = tanksum[j - 1] + tank1[i - 1][j];
    for (int j = 1; j <= hp2; ++j) tank1[i][j] += tank1[i - 1][j] * p1 / 100;
    double t = double(100 - p1) / 100 / (r1 - l1 + 1);
    for (int j = -100; j <= hp2 - l1; ++j)
      tank1[i][max(j, 0)] +=
          (tanksum[min(max(0, j + r1), hp2)] - tanksum[max(0, j + l1 - 1)]) * t;
  }
  for (int i = 1; i <= MAXN; ++i) {
    memset(tanksum, 0, sizeof(tanksum));
    tanksum[0] = tank2[i - 1][0];
    for (int j = 1; j <= hp1; ++j)
      tanksum[j] = tanksum[j - 1] + tank2[i - 1][j];
    for (int j = 1; j <= hp1; ++j) tank2[i][j] += tank2[i - 1][j] * p2 / 100;
    double t = double(100 - p2) / 100 / (r2 - l2 + 1);
    for (int j = -100; j <= hp1 - l2; ++j)
      tank2[i][max(j, 0)] +=
          (tanksum[min(max(0, j + r2), hp1)] - tanksum[max(0, j + l2 - 1)]) * t;
  }
  double ans = 0;
  for (int i = 1; i <= MAXN; ++i) {
    int j = (i - 1) * pp1 / pp2 + 1;
    if (j > MAXN) j = MAXN;
    for (int k = 1; k <= hp1; ++k) ans += tank1[i][0] * tank2[j][k];
    if ((i - 1) * pp1 == (j - 1) * pp2) ans += tank1[i][0] * tank2[j][0];
  }
  printf("%.6lf\n", ans);
  return 0;
}
