#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  double m;
  scanf("%lf", &m);
  double z = 0;
  int i;
  int s[1005];
  int s1[1005];
  memset(s, 0, sizeof(s));
  memset(s1, 0, sizeof(s1));
  int falg = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &s[i]);
    if (s[i] == 1) falg = 1;
  }
  for (i = 0; i < n; i++) {
    scanf("%d", &s1[i]);
    if (s1[i] == 1) falg = 1;
  }
  double y = 0;
  if (falg == 1)
    printf("-1\n");
  else {
    y = m / (s1[0] - 1);
    z = z + y;
    m = m + y;
    for (i = n - 1; i > 0; i--) {
      y = m / (s[i] - 1);
      m = m + y;
      z = z + y;
      y = m / (s1[i] - 1);
      m = m + y;
      z = z + y;
    }
    y = m / (s[0] - 1);
    z = z + y;
    printf("%.10lf\n", z);
  }
  return 0;
}
