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