#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  long double m;
  cin >> n >> m;
  vector<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 ans = m * (b[0]) / (b[0] - 1);
  for (int i = n - 1; i > 0; i--) {
    ans = ans * (a[i]) / (a[i] - 1);
    ans = ans * (b[i]) / (b[i] - 1);
  }
  ans = ans * (a[0]) / (a[0] - 1);
  if (ans > 10e10)
    cout << -1;
  else
    cout << fixed << setprecision(20) << ans - m;
}
