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>
using namespace std;
template <typename T, typename U>
inline void smin(T &a, U b) {
  if (a > b) a = b;
}
template <typename T, typename U>
inline void smax(T &a, U b) {
  if (a < b) a = b;
}
template <class T>
inline void gn(T &second) {
  char c, sg = 0;
  while (c = getchar(), (c > '9' || c < '0') && c != '-')
    ;
  for ((c == '-' ? sg = 1, c = getchar() : 0), second = 0; c >= '0' && c <= '9';
       c = getchar())
    second = (second << 1) + (second << 3) + c - '0';
  if (sg) second = -second;
}
template <class T1, class T2>
inline void gn(T1 &x1, T2 &x2) {
  gn(x1), gn(x2);
}
template <class T1, class T2, class T3>
inline void gn(T1 &x1, T2 &x2, T3 &x3) {
  gn(x1), gn(x2), gn(x3);
}
template <class T1, class T2, class T3, class T4>
inline void gn(T1 &x1, T2 &x2, T3 &x3, T4 &x4) {
  gn(x1), gn(x2), gn(x3), gn(x4);
}
template <class T>
inline void print(T second) {
  if (second < 0) {
    putchar('-');
    return print(-second);
  }
  if (second < 10) {
    putchar('0' + second);
    return;
  }
  print(second / 10);
  putchar(second % 10 + '0');
}
template <class T>
inline void printsp(T second) {
  print(second);
  putchar(' ');
}
template <class T>
inline void println(T second) {
  print(second);
  putchar('\n');
}
template <class T1, class T2>
inline void print(T1 x1, T2 x2) {
  printsp(x1), println(x2);
}
template <class T1, class T2, class T3>
inline void print(T1 x1, T2 x2, T3 x3) {
  printsp(x1), printsp(x2), println(x3);
}
template <class T1, class T2, class T3, class T4>
inline void print(T1 x1, T2 x2, T3 x3, T4 x4) {
  printsp(x1), printsp(x2), printsp(x3), println(x4);
}
int power(int a, int b, int m, int ans = 1) {
  for (; b; b >>= 1, a = 1LL * a * a % m)
    if (b & 1) ans = 1LL * ans * a % m;
  return ans;
}
pair<long long, long long> p[200010], dp[200010];
int main() {
  int n, first;
  gn(n, first);
  for (int i = 1; i <= n; i++) gn(p[i].second);
  for (int i = 1; i <= n; i++) gn(p[i].first);
  sort(p + 1, p + n + 1);
  for (int i = 1; i <= n; i++) {
    p[i].first -= first;
    dp[i].second = dp[i - 1].second + p[i].second;
    dp[i].first = dp[i - 1].first + 1LL * p[i].second * p[i].first;
  }
  if (dp[n].first == 0) {
    println(dp[n].second);
    return 0;
  }
  if (dp[n].first < 0) {
    for (int i = 1; i <= n; i++) p[i].first = -p[i].first;
    sort(p + 1, p + n + 1);
    for (int i = 1; i <= n; i++) {
      dp[i].second = dp[i - 1].second + p[i].second;
      dp[i].first = dp[i - 1].first + 1LL * p[i].second * p[i].first;
    }
  }
  for (int i = n + 1; --i;) {
    if (dp[i].first == 0) {
      println(dp[i].second);
      return 0;
    }
    if (dp[i].first < 0) {
      printf("%.6lf\n", dp[i].second - 1.0 * dp[i].first / p[i + 1].first);
      return 0;
    }
  }
  puts("0");
}