#include <bits/stdc++.h>
using namespace std;
double m, n, a, i;
signed main() {
  double val = 1;
  cin >> n >> m;
  for (i = 0; i < 2 * n; i++) {
    cin >> a;
    val = val * (a - 1) / a;
  }
  if (val == 0) {
    cout << -1;
    return 0;
  }
  val = m / val;
  val = val - m;
  cout << setprecision(7) << val;
}
