#include <bits/stdc++.h>
using namespace std;
int main() {
  double w, ww;
  int n;
  cin >> n >> w;
  ww = w;
  double u[n], l[n];
  int flag = 0;
  for (int i = n - 1; i >= 0; i--) {
    cin >> u[i];
    if (u[i] == 1) flag = 1;
  }
  for (int i = n - 1; i >= 0; i--) {
    cin >> l[i];
    if (l[i] == 1) flag = 1;
  }
  if (flag == 1) {
    printf("-1\n");
    return 0;
  }
  double ans = (w / (l[n - 1] - 1));
  w += ans;
  for (int i = 0; i < n - 1; i++) {
    ans = (w / (u[i] - 1));
    w += ans;
    ans = (w / (l[i] - 1));
    w += ans;
  }
  ans = (w / (u[n - 1] - 1));
  w += ans;
  printf("%.8lf\n", w - ww);
  return 0;
}
