#include <bits/stdc++.h>
using namespace std;
struct Node {
  double u, v;
} cnt[200006];
int n;
inline bool operator<(const Node &a, const Node &b) { return a.v < b.v; }
int main() {
  double T;
  scanf("%d %lf", &n, &T);
  for (int i = 0; i < n; i++) scanf("%lf", &cnt[i].u);
  for (int i = 0; i < n; i++) scanf("%lf", &cnt[i].v), cnt[i].v -= T;
  double sum = 0;
  for (int i = 0; i < n; i++) sum += cnt[i].v * cnt[i].u;
  if (sum < 0) {
    for (int i = 0; i < n; i++) cnt[i].v *= -1;
  }
  sort(cnt, cnt + n);
  double now = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    if (now + cnt[i].v * cnt[i].u <= 0) {
      ans += cnt[i].u;
      now += cnt[i].v * cnt[i].u;
    } else {
      ans += now / -cnt[i].v;
      break;
    }
  }
  return !printf("%.16lf", fabs(ans));
}
