#include <bits/stdc++.h>
double a[1005], b[1005];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  int minus = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &a[i]);
    if (a[i] == 1) minus = 1;
  }
  for (int i = 1; i <= n; i++) {
    scanf("%lf", &b[i]);
    if (b[i] == 1) minus = 1;
  }
  if (minus == 1) {
    printf("-1");
  } else {
    double please = m;
    for (int i = 1; i <= n; i++) {
      please *= a[i];
      please /= (a[i] - 1);
    }
    for (int i = 1; i <= n; i++) {
      please *= b[i];
      please /= (b[i] - 1);
    }
    printf("%lf", please - (double)m);
  }
}
