#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, a, n, m;
  double sum = 1, res = 4000000000.0000000000;
  cin >> n >> m;
  for (i = 0; i < n; i++) {
    cin >> a;
    sum *= (double)(1.00 - (1.00 / (double)a));
  }
  for (i = 0; i < n; i++) {
    cin >> a;
    sum *= (double)(1.00 - (1.00 / (double)a));
  }
  res = (double)m / sum;
  res = res - m;
  if (res > 2000000000.0000000000)
    cout << -1 << "\n";
  else
    printf("%.10f\n", res);
  return 0;
}
