/*Bismillahir Rahmanir Raheem*/
#include <bits/stdc++.h>
using namespace std;
#define kuka ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);
#define pb push_back
#define sz(x) x.size()
#define all(x) x.begin(), x.end()
#define FOR(n) for(int i = 0; i < n; i++)
#define ff(x, y) for( int y = 0; y < x; y++)
#define fff(x, y) for( int y = x; y <= 0; y--)
#define F first
#define S second
//#define int long long
typedef long long ll;
typedef unsigned long long ull;
typedef long double ld;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
const ll INF = LLONG_MAX;
const int inf = INT_MAX;
const int N = 1e5 + 5;
const int MOD = 1e9 + 7;
int n, L;
ld d[N], v[N];
ld pref_t[N], pref_s[N];
ld get() {
ld ans = 1e15;
for (int i = 1; i <= n; i++) {
pref_t[i] = pref_t[i - 1] + ((ld)d[i] / (ld)v[i]);
pref_s[i] = pref_s[i - 1] + d[i];
}
for (int i = 1; i <= n; i++) {
int l = i - 1, r = n + 1;
while (r - l > 1) {
int mid = (l + r) / 2;
if (pref_s[mid] - pref_s[l] < L) {
l = mid;
} else {
r = mid;
}
}
ld sum = pref_t[i - 1] + pref_t[n] - pref_t[l];
if (l < n) {
ld last = L - (pref_s[l] - pref_s[i - 1]);
if (l + 1 <= n) {
sum += last / v[l + 1];
}
}
ans = min(ans, sum);
}
return ans;
}
void oyan() {
cin >> n >> L;
for (int i = 1; i <= n; i++) {
cin >> d[i];
}
for (int i = 1; i <= n; i++) {
cin >> v[i];
}
ld ans1 = get();
reverse(d + 1, d + n + 1);
reverse(v + 1, v + n + 1);
ld ans2 = get();
cout << fixed << setprecision(9) << min(ans1, ans2) << "\n";
}
main(){
kuka;
//freopen("test.txt", "r", stdin);
//freopen("distance.in", "r", stdin);
//freopen("distance.out", "w", stdout);
int oylan = 1;
//cin>>oylan;
while(oylan--){
oyan();
}
}
/*
NOTES
a/b module == (a*b^(module - 2)) % (module);
ll binpow(int n, int k) {
if (k == 0) {
return 1;
}if (k % 2 == 0) {
ll val = binpow(n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MgPSAxZTE1OwoKICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IG47IGkrKykgewogICAgICAgIHByZWZfdFtpXSA9IHByZWZfdFtpIC0gMV0gKyAoKGxkKWRbaV0gLyAobGQpdltpXSk7CiAgICAgICAgcHJlZl9zW2ldID0gcHJlZl9zW2kgLSAxXSArIGRbaV07CiAgICB9CgogICAgZm9yIChpbnQgaSA9IDE7IGkgPD0gbjsgaSsrKSB7CiAgICAgICAgaW50IGwgPSBpIC0gMSwgciA9IG4gKyAxOwoKICAgICAgICB3aGlsZSAociAtIGwgPiAxKSB7CiAgICAgICAgICAgIGludCBtaWQgPSAobCArIHIpIC8gMjsKICAgICAgICAgICAgaWYgKHByZWZfc1ttaWRdIC0gcHJlZl9zW2xdIDwgTCkgewogICAgICAgICAgICAgICAgbCA9IG1pZDsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHIgPSBtaWQ7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIGxkIHN1bSA9IHByZWZfdFtpIC0gMV0gKyBwcmVmX3Rbbl0gLSBwcmVmX3RbbF07CiAgICAgICAgaWYgKGwgPCBuKSB7CiAgICAgICAgICAgIGxkIGxhc3QgPSBMIC0gKHByZWZfc1tsXSAtIHByZWZfc1tpIC0gMV0pOwogICAgICAgICAgICBpZiAobCArIDEgPD0gbikgewogICAgICAgICAgICAgICAgc3VtICs9IGxhc3QgLyB2W2wgKyAxXTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICBhbnMgPSBtaW4oYW5zLCBzdW0pOwogICAgfQoKICAgIHJldHVybiBhbnM7Cn0KCnZvaWQgb3lhbigpIHsKICAgIGNpbiA+PiBuID4+IEw7CiAgICBmb3IgKGludCBpID0gMTsgaSA8PSBuOyBpKyspIHsKICAgICAgICBjaW4gPj4gZFtpXTsKICAgIH0KICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IG47IGkrKykgewogICAgICAgIGNpbiA+PiB2W2ldOwogIC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