#include <bits/stdc++.h>
using namespace std;
int H[2], ar[2], l[2], r[2], dt[2];
int t[2];
double dp[2][202], hit[2], res[2];
void solve(int k) {
  t[k] += dt[k];
  for (int h = 1; h <= H[k ^ 1]; h++)
    if (dp[k ^ 1][h] > 1e-9) {
      for (int d = l[k]; d <= r[k]; d++)
        dp[k ^ 1][max(h - d, 0)] += dp[k ^ 1][h] * hit[k];
      dp[k ^ 1][h] *= 0.01 * ar[k];
    }
  res[k] += dp[k ^ 1][0] * (1 - dp[k][0]);
  if (k == 0) dp[1][0] = 0;
}
int main() {
  for (int i = 0; i < 2; i++) {
    cin >> H[i] >> dt[i] >> l[i] >> r[i] >> ar[i];
    if (ar[i] == 100) {
      cout << i << endl;
      return 0;
    }
    dp[i][H[i]] = 1;
  }
  for (int i = 0; i < 2; i++)
    hit[i] = (1.0 / (r[i] - l[i] + 1.0)) * (1 - 0.01 * ar[i]);
  for (int i = 0; i < 10000; i++)
    if (t[0] <= t[1])
      solve(0);
    else
      solve(1);
  cout << res[0] << endl;
  return 0;
}
