#include <bits/stdc++.h>
using namespace std;
struct ww {
  int hp, dt, l, r, len;
  double p;
  inline void read() {
    scanf("%d%d%d%d%lf", &hp, &dt, &l, &r, &p);
    len = r - l + 1;
    p /= 100;
    p = 1 - p;
  }
} A, B;
int i, j, k, n, m, nn, l1, l2, mm;
double a[450], b[450][450], c[450];
double h[30][210], v[2][30];
inline void work(int _) {
  memset(h, 0, sizeof(h));
  h[0][0] = 1;
  for (i = 0; i <= 20; i++)
    for (j = 0; j <= B.hp; j++)
      for (k = A.l; k <= A.r; k++)
        h[i + 1][min(j + k, B.hp)] += h[i][j] / A.len;
  for (i = 1; i <= 20; i++)
    if (h[i - 1][B.hp] < 1)
      v[_][i] = (h[i][B.hp] - h[i - 1][B.hp]) / (1 - h[i - 1][B.hp]);
}
inline void gaosi() {
  for (i = 0; i <= nn - 1; i++) {
    for (j = i; j <= nn - 1; j++)
      if (b[j][i]) {
        for (k = 0; k <= nn; k++) swap(b[i][k], b[j][k]);
        break;
      }
    if (!b[i][i]) continue;
    for (k = nn; k >= i; k--) b[i][k] /= b[i][i];
    for (j = i + 1; j <= nn - 1; j++)
      if (b[j][i])
        for (k = nn; k >= i; k--) b[j][k] -= b[j][i] * b[i][k];
  }
  for (i = nn - 1; i >= 0; i--)
    if (b[i][i]) {
      for (j = 0; j <= i - 1; j++) b[j][nn] -= b[j][i] * b[i][nn];
    }
}
int main() {
  A.read();
  B.read();
  swap(A, B);
  work(0);
  swap(A, B);
  work(1);
  l2 = A.hp / 10 + (A.hp % 10 > 0);
  l1 = B.hp / 10 + (B.hp % 10 > 0);
  nn = l1 * l2;
  for (i = 0; i <= nn - 1; i++) b[i][i] = 1;
  for (j = 0; j <= nn - 1; j++) {
    memset(a, 0, sizeof(a));
    a[j] = 1;
    for (k = 0; k <= A.dt * B.dt - 1; k++) {
      if (k % A.dt == 0) {
        memcpy(c, a, sizeof(c));
        for (i = 0; i <= nn - 1; i++) a[i] *= 1 - A.p, c[i] *= A.p;
        for (i = 0; i <= nn - 1; i++)
          if (c[i]) {
            int A = i / l2, B = i % l2;
            a[nn] += c[i] * v[1][A + 1];
            if (A + 1 < l1) a[i + l2] += c[i] * (1 - v[1][A + 1]);
          }
      }
      if (k % B.dt == 0) {
        memcpy(c, a, sizeof(c));
        for (i = 0; i <= nn - 1; i++) a[i] *= 1 - B.p, c[i] *= B.p;
        for (i = 0; i <= nn - 1; i++)
          if (c[i]) {
            int A = i / l2, B = i % l2;
            if (B + 1 < l2) a[i + 1] += c[i] * (1 - v[0][B + 1]);
          }
      }
    }
    for (i = 0; i <= nn; i++) b[j][i] += a[i] * (i < nn ? -1 : 1);
  }
  gaosi();
  printf("%.12lf\n", b[0][nn]);
  return 0;
}
