#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long double m;
  cin >> m;
  long double a[n], b[n];
  bool k = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == 1) k = true;
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    if (b[i] == 1) k = true;
  }
  if (k) {
    cout << -1 << endl;
    return 0;
  }
  long double ans = 0.0;
  vector<long long> v;
  v.push_back(b[0]);
  for (int i = n - 1; i > 0; i--) {
    v.push_back(a[i]);
    v.push_back(b[i]);
  }
  v.push_back(a[0]);
  long double prev = 0.0;
  for (int i = 0; i < v.size(); i++) {
    m = m + prev;
    prev = (m) / (v[i] - 1);
    ans += prev;
  }
  cout << setprecision(9) << fixed;
  cout << ans << endl;
}
