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