#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m;
  cin >> n;
  cin >> m;
  long long a[n], b[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    if (b[i] == 1) {
      cout << -1;
      return 0;
    }
  }
  double M = m * 1.000000;
  double ans = 0.0;
  double toLand, toTakeOff, weight, fuel;
  fuel = M * 1.00000000 / (b[0] - 1);
  ans += fuel;
  M = M + fuel;
  for (int i = n - 1; i >= 0; i--) {
    fuel = M * 1.00000000 / (a[i] - 1);
    ans += fuel;
    if (i != 0) {
      M += fuel;
      fuel = M * 1.000000000 / (b[i] - 1);
      ans += fuel;
      M += fuel;
    }
  }
  printf("%.9lf", ans);
  return 0;
}
