#include <bits/stdc++.h>
using namespace std;
int h[2], d[2], l[2], r[2];
double p[2];
long double dp[2][20010][210], sum[2][20010][210];
long double gets(int i, int j, int k) {
  double len = r[i] - l[i] + 1.0;
  if (k - r[i] >= 0)
    return (sum[i][j - 1][k - l[i]] -
            (0.0 + (k - r[i] > 0 ? sum[i][j - 1][k - r[i] - 1] : 0.0))) /
           len;
  else if (k - l[i] > 0)
    return (sum[i][j - 1][k - l[i]] +
            dp[i][j - 1][0] * (len - k + l[i] - 1.0)) /
           len;
  else
    return dp[i][j - 1][0];
}
int main(void) {
  for (int i = 0; i < (2); ++i) {
    int pr;
    scanf("%d%d%d%d%d", &h[i], &d[i], &l[i], &r[i], &pr);
    p[i] = 0.01 * pr;
  }
  for (int i = 0; i < (2); ++i) {
    dp[i][0][0] = 1.0;
    for (int k = 1; k <= h[1 - i]; ++k) dp[i][0][k] = 0.0;
    for (int k = 0; k <= h[1 - i]; ++k)
      sum[i][0][k] = dp[i][0][k] + (k > 0 ? sum[i][0][k - 1] : 0.0);
    for (int j = 1; j <= 20000; ++j) {
      dp[i][j][0] = 0.0;
      for (int k = 1; k <= h[1 - i]; ++k)
        dp[i][j][k] = p[i] * dp[i][j - 1][k] + (1.0 - p[i]) * gets(i, j, k);
      for (int k = 0; k <= h[1 - i]; ++k)
        sum[i][j][k] = dp[i][j][k] + (k > 0 ? sum[i][j][k - 1] : 0.0);
    }
  }
  long double res = 0.0;
  long double x = 1.0;
  int j = 0;
  for (int i = 0; i < (20000); ++i) {
    while (j < 20000 && j * d[1] < i * d[0]) {
      x -= dp[1][j + 1][h[0]];
      ++j;
    }
    res += dp[0][i + 1][h[1]] * x;
  }
  double R = res;
  printf("%.10lf\n", R);
  return 0;
}
