#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double x, cx;
  cin >> n >> x;
  cx = x;
  double a[n + 1], b[n + 1];
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == 1) {
      cout << -1;
      return 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    cin >> b[i];
    if (b[i] == 1) {
      cout << -1;
      return 0;
    }
  }
  x = x + x / (b[1] - 1);
  for (int i = n; i > 1; i--) {
    x = x * a[i] / (a[i] - 1);
    x = x * b[i] / (b[i] - 1);
  }
  x = x + x / (a[1] - 1);
  cout << setprecision(8) << x - cx;
  return 0;
}
