#include <bits/stdc++.h>
using namespace std;
double p[210][210][100];
double a[100], b[100];
int xx[100];
int h1, d1, l1, r1, p1;
int h2, d2, l2, r2, p2;
double calcp(int x, int y, int z) {
  if (y <= 0)
    return 1;
  else if (x <= 0)
    return 0;
  else
    return p[x][y][z];
}
void calc(int x, int y, int z) {
  if (z > 30) {
    double pp = 0, p0 = (1 - p2 / 100.0) / (r2 - l2 + 1);
    for (int i = l2; i <= r2; i++) pp += p0 * calcp(x - i, y, z - d2);
    b[z] = pp;
  } else if (z < 30) {
    double pp = 0, p0 = (1 - p1 / 100.0) / (r1 - l1 + 1);
    for (int i = l1; i <= r1; i++) pp += p0 * calcp(x, y - i, z + d1);
    b[z] = pp;
  } else {
    double pp = 0, p0 = (p1 / 100.0) * (1 - p2 / 100.0) / (r2 - l2 + 1);
    for (int i = l2; i <= r2; i++) pp += p0 * calcp(x - i, y, d1 - d2 + 30);
    p0 = (1 - p1 / 100.0) * (p2 / 100.0) / (r1 - l1 + 1);
    for (int i = l1; i <= r1; i++) pp += p0 * calcp(x, y - i, d1 - d2 + 30);
    p0 = (1 - p1 / 100.0) * (1 - p2 / 100.0) / (r1 - l1 + 1) / (r2 - l2 + 1);
    for (int i = l1; i <= r1; i++)
      for (int j = l2; j <= r2; j++)
        pp += p0 * calcp(x - j, y - i, d1 - d2 + 30);
    b[z] = pp;
  }
}
int main() {
  scanf("%d%d%d%d%d", &h1, &d1, &l1, &r1, &p1);
  scanf("%d%d%d%d%d", &h2, &d2, &l2, &r2, &p2);
  if (p1 == 100 && p2 == 100) {
    cout << 0 << endl;
    return 0;
  }
  memset(p, 0, sizeof(p));
  xx[0] = 30;
  xx[1] = d1 - d2 + 30;
  int e = 1;
  while (xx[e] - 30) {
    if (xx[e] < 30)
      xx[e + 1] = xx[e] + d1;
    else
      xx[e + 1] = xx[e] - d2;
    e++;
  }
  for (int i = 31 - d2; i <= 29 + d1; i++)
    if (i < 30)
      a[i] = p1 / 100.0;
    else if (i > 30)
      a[i] = p2 / 100.0;
    else
      a[i] = p1 * p2 / 10000.0;
  for (int i = 1; i <= h1; i++)
    for (int j = 1; j <= h2; j++) {
      for (int k = 0; k < e; k++) calc(i, j, xx[k]);
      double aa = a[xx[0]], bb = b[xx[0]];
      for (int k = 1; k < e; k++) {
        bb += aa * b[xx[k]];
        aa *= a[xx[k]];
      }
      p[i][j][xx[e]] = bb / (1 - aa);
      for (int k = e - 1; k >= 1; k--)
        p[i][j][xx[k]] = a[xx[k]] * p[i][j][xx[k + 1]] + b[xx[k]];
    }
  printf("%.6lf\n", p[h1][h2][30]);
  return 0;
}
