#include <bits/stdc++.h>
using namespace std;
int hp[2], dt[2], l[2], r[2], p[2];
double dp[30000 + 10][210];
double a[30000 + 10], b[30000 + 10];
void func(int hp, int low, int high, double fail) {
  int i, j;
  for ((i) = 0; (i) < (int)(30000 + 1); (i)++)
    for ((j) = 0; (j) < (int)(hp + 1); (j)++) dp[i][j] = 0.0;
  dp[0][hp] = 1.0;
  for (i = 1; i <= 30000; i++) {
    double p = (1.0 - fail) / (high - low + 1);
    double sum = 0.0;
    for (j = hp; j >= 1; j--) {
      dp[i][j] += dp[i - 1][j] * fail;
      if (j + low <= hp) sum += dp[i - 1][j + low];
      if (j + high + 1 <= hp) sum -= dp[i - 1][j + high + 1];
      dp[i][j] += sum * p;
    }
    dp[i][0] = 1.0;
    for (j = 1; j <= hp; j++) dp[i][0] -= dp[i][j];
    for ((j) = 0; (j) < (int)(hp + 1); (j)++)
      if (dp[i][j] < 1.0E-20) dp[i][j] = 0.0;
  }
}
int main(void) {
  int i;
  for ((i) = 0; (i) < (int)(2); (i)++)
    cin >> hp[i] >> dt[i] >> l[i] >> r[i] >> p[i];
  if (p[0] == 100) {
    cout << 0.0 << endl;
    return 0;
  }
  if (p[1] == 100) {
    cout << 1.0 << endl;
    return 0;
  }
  func(hp[0], l[1], r[1], p[1] / 100.0);
  for ((i) = 0; (i) < (int)(30000 + 1); (i)++) a[i] = dp[i][0];
  func(hp[1], l[0], r[0], p[0] / 100.0);
  for ((i) = 0; (i) < (int)(30000 + 1); (i)++) b[i] = dp[i][0];
  int x = 0, y = 0;
  double ans = 0.0;
  for (i = 0;; i++) {
    if (x == 30000 && y == 30000) break;
    if (i % dt[0] == 0 && y < 30000) {
      y++;
      ans += (b[y] - b[y - 1]) * (1.0 - a[x]);
    }
    if (i % dt[1] == 0 && x < 30000) x++;
  }
  printf("%.9f\n", ans);
  return 0;
}
