#include <bits/stdc++.h>
using namespace std;
double a[1005], b[1005];
int main() {
  int n, m, flag;
  double sum, ful;
  while (scanf("%d %d", &n, &m) != EOF) {
    sum = 0;
    flag = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%lf", &a[i]);
      if ((int)a[i] == 1) flag = 1;
    }
    for (int i = 1; i <= n; i++) {
      scanf("%lf", &b[i]);
      if ((int)b[i] == 1) flag = 1;
    }
    if (flag == 1)
      printf("-1\n");
    else {
      ful = (m + sum) / (b[1] - 1);
      sum += ful;
      for (int i = n; i > 1; i--) {
        ful = (m + sum) / (b[i] - 1);
        sum += ful;
        ful = (m + sum) / (a[i] - 1);
        sum += ful;
      }
      ful = (m + sum) / (a[1] - 1);
      sum += ful;
      printf("%.8f\n", sum);
    }
  }
  return 0;
}
