#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  vector<int> a(n);
  vector<int> 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 s = 1.0 * m;
  s += 1.0 * s / (a[0] - 1);
  for (int i = n - 1; i >= 1; i--) {
    s += 1.0 * s / (b[i] - 1);
    s += 1.0 * s / (a[i] - 1);
  }
  s += s / (b[0] - 1);
  cout << setprecision(6) << fixed << s - 1.0 * m;
  return 0;
}
