#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e5 + 100;
const long double EPS = 1e-9;
int n, T, a[MAXN], t[MAXN];
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> T;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    cin >> t[i];
  }
  multiset<pair<int, long double>> less, more;
  long double ans = 0;
  for (int i = 0; i < n; i++) {
    if (t[i] > T) more.insert({t[i] - T, a[i]});
    if (t[i] < T) less.insert({T - t[i], a[i]});
    if (t[i] == T) ans += a[i];
  }
  while (more.size() && less.size()) {
    auto r = *more.begin(), l = *less.begin();
    less.erase(less.find(l));
    more.erase(more.find(r));
    long double lt = l.first * (l.second), rt = r.first * (r.second);
    if (abs(lt - rt) < EPS) {
      ans += l.second + r.second;
      continue;
    }
    if (lt > rt) {
      less.insert({l.first, l.second - rt / (l.first)});
      ans += r.second + rt / l.first;
    } else {
      more.insert({r.first, r.second - lt / (r.first)});
      ans += l.second + lt / r.first;
    }
  }
  cout << setprecision(10) << fixed << ans << endl;
}
