Problem: Consider a system of n water taps all pouring water into the same container. The i-th water tap can be set to deliver any amount of water from 0 to ai ml per second (this amount may be a real number). The water delivered by i-th tap has temperature ti.

If for every <image> you set i-th tap to deliver exactly xi ml of water per second, then the resulting temperature of water will be <image> (if <image>, then to avoid division by zero we state that the resulting water temperature is 0).

You have to set all the water taps in such a way that the resulting temperature is exactly T. What is the maximum amount of water you may get per second if its temperature has to be T?

Input

The first line contains two integers n and T (1 ≤ n ≤ 200000, 1 ≤ T ≤ 106) — the number of water taps and the desired temperature of water, respectively.

The second line contains n integers a1, a2, ..., an (1 ≤ ai ≤ 106) where ai is the maximum amount of water i-th tap can deliver per second.

The third line contains n integers t1, t2, ..., tn (1 ≤ ti ≤ 106) — the temperature of water each tap delivers.

Output

Print the maximum possible amount of water with temperature exactly T you can get per second (if it is impossible to obtain water with such temperature, then the answer is considered to be 0).

Your answer is considered correct if its absolute or relative error doesn't exceed 10 - 6.

Examples

Input

2 100
3 10
50 150


Output

6.000000000000000


Input

3 9
5 5 30
6 6 10


Output

40.000000000000000


Input

2 12
1 3
10 15


Output

1.666666666666667

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const long long MOD = 1000000007LL, INF = 1e9, LINF = 1e18;
const long double PI = 3.141592653589793116, EPS = 1e-9,
                  GOLD = ((1 + sqrt(5)) / 2);
template <class T>
int getbit(T s, int i) {
  return (s >> 1) & 1;
}
template <class T>
T onbit(T s, int i) {
  return s | (T(1) << i);
}
template <class T>
T offbit(T s, int i) {
  return s & (~(T(1) << i));
}
template <class T>
int cntbit(T s) {
  return __builtin_popcount(s);
}
long long n, T;
vector<pair<long long, long long> > tap;
bool prioritizeTemp(pair<long long, long long> a,
                    pair<long long, long long> b) {
  return (abs(a.second) > abs(b.second));
}
void VarInput() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n >> T;
  tap.resize(n);
  for (long long i = 0; i < n; i++) cin >> tap[i].first;
  for (long long i = 0; i < n; i++) {
    cin >> tap[i].second;
    tap[i].second -= T;
  }
}
void ProSolve() {
  long long additional = 0;
  for (long long i = 0; i < n; i++) {
    if (tap[i].second == 0) additional += tap[i].first;
  }
  long double negative = 0, positive = 0, ans = 0;
  for (long long i = 0; i < n; i++) ans += tap[i].first;
  vector<pair<long long, long long> > neg, pos;
  for (long long i = 0; i < n; i++) {
    if (tap[i].second < 0) {
      negative += ((long double)tap[i].first * abs(tap[i].second));
      neg.push_back(tap[i]);
    } else if (tap[i].second > 0) {
      positive += ((long double)tap[i].first * abs(tap[i].second));
      pos.push_back(tap[i]);
    }
  }
  if (negative < EPS || positive < EPS) {
    cout << fixed << setprecision(9) << additional;
    return;
  }
  if (negative - positive >= EPS) {
    sort(neg.begin(), neg.end(), prioritizeTemp);
    for (long long i = 0; i < neg.size(); i++) {
      if (negative - positive < EPS) break;
      long double tmp = min((negative - positive) / abs(neg[i].second),
                            (long double)neg[i].first);
      ans -= tmp;
      negative -= (tmp * abs(neg[i].second));
    }
  } else if (positive - negative >= EPS) {
    sort(pos.begin(), pos.end(), prioritizeTemp);
    for (long long i = 0; i < pos.size(); i++) {
      if (positive - negative < EPS) break;
      long double tmp = min((positive - negative) / abs(pos[i].second),
                            (long double)pos[i].first);
      ans -= tmp;
      positive -= (tmp * abs(pos[i].second));
    }
  }
  cout << fixed << setprecision(9) << ans;
}
int main() {
  VarInput();
  ProSolve();
  return 0;
}