#include <bits/stdc++.h>
using namespace std;
int main() {
  int k = 0;
  long long int n, m;
  cin >> n >> m;
  long double a[n], b[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) cin >> b[i];
  long double pr = 1;
  for (int i = 0; i < n; i++) {
    pr = pr * ((a[i]) / (a[i] - 1));
    if (a[i] == 1) {
      cout << "-1";
      return 0;
    }
  }
  for (int i = 0; i < n; i++) {
    pr = pr * ((b[i]) / (b[i] - 1));
    if (b[i] == 1) {
      cout << "-1";
      return 0;
    }
  }
  long double ans = pr * m - m;
  cout << fixed << setprecision(10) << ans;
}
