#include <bits/stdc++.h>
using namespace std;
struct Node {
  long double sum;
  int i;
};
class mycomp {
 public:
  bool operator()(struct Node a, struct Node b) { return a.sum > b.sum; }
};
int main(int argc, const char* argv[]) {
  int n;
  long double m;
  cin >> n >> m;
  long double a[1001], b[1001];
  bool flag = false;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] <= 1) {
      flag = true;
    }
  }
  for (int i = 0; i < n; i++) {
    cin >> b[i];
    if (b[i] <= 1) {
      flag = true;
    }
  }
  if (flag == true) {
    cout << -1 << endl;
    return 0;
  }
  long double res = 0.0, fuel = 0.0;
  res = (m / (b[0] - 1));
  fuel = (m / (b[0] - 1));
  m += fuel;
  fuel = (m / (a[n - 1] - 1));
  res += fuel;
  m += fuel;
  fuel = (m / (b[n - 1] - 1));
  res += fuel;
  m += fuel;
  priority_queue<struct Node, vector<Node>, mycomp> p;
  for (int i = 1; i < n - 1; i++) {
    struct Node n = {a[i] + b[i], i};
    p.push(n);
  }
  while (!p.empty()) {
    Node temp = p.top();
    p.pop();
    fuel = (m / (a[temp.i] - 1));
    res += fuel;
    m += fuel;
    fuel = (m / (b[temp.i] - 1));
    res += fuel;
    m += fuel;
  }
  fuel = (m / (a[0] - 1));
  res += fuel;
  cout << setprecision(17) << res << endl;
  return 0;
}
