#include <bits/stdc++.h>
using namespace std;
template <class T>
T MAX(T a, T b) {
  return ((a > b) ? a : b);
}
template <class T>
T MIN(T a, T b) {
  return ((a < b) ? a : b);
}
template <class T>
T MOD(T a) {
  return ((a >= 0) ? a : (-1 * a));
}
template <class T>
void SWAP(T &a, T &b) {
  T temp = a;
  a = b;
  b = temp;
}
vector<double> a, b;
int main() {
  long long n;
  cin >> n;
  a.resize(n);
  b.resize(n);
  long long m;
  cin >> m;
  bool boo = 0;
  for (int i = 0; i <= n - 1; ++i) {
    cin >> a[i];
    if (a[i] <= 1) {
      boo = 1;
    }
  }
  for (int i = 0; i <= n - 1; ++i) {
    cin >> b[i];
    if (b[i] <= 1) {
      boo = 1;
    }
  }
  if (boo == 1) {
    cout << -1 << "\n";
    return 0;
  }
  double pre = m;
  pre *= ((a[0] * b[0]) / ((a[0] - 1) * (b[0] - 1)));
  pre *= ((a[n - 1] * b[n - 1]) / ((a[n - 1] - 1) * (b[n - 1] - 1)));
  for (int i = 1; i < n - 1; ++i) {
    pre *= ((a[i] * b[i]) / ((1 - a[i]) * (1 - b[i])));
  }
  printf("%.10lf\n", pre - m);
}
