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 *a*<sub class="lower-index">*i*</sub> ml per second (this amount may be a real number). The water delivered by *i*-th tap has temperature *t*<sub class="lower-index">*i*</sub>.

If for every <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/29cd41d3b7a01103f80f7f1a061fdf146ffa49b1.png" style="max-width: 100.0%;max-height: 100.0%;"/> you set *i*-th tap to deliver exactly *x*<sub class="lower-index">*i*</sub> ml of water per second, then the resulting temperature of water will be <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/80ff149d627e36b02eb3a7af6ef4c83c177753f1.png" style="max-width: 100.0%;max-height: 100.0%;"/> (if <img align="middle" class="tex-formula" src="https://espresso.codeforces.com/b3732be77fa6132294370a6abded03dbe6bec83a.png" style="max-width: 100.0%;max-height: 100.0%;"/>, 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*?
The first line contains two integers *n* and *T* (1 ≤ *n* ≤ 200000, 1 ≤ *T* ≤ 10<sup class="upper-index">6</sup>) — the number of water taps and the desired temperature of water, respectively.

The second line contains *n* integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">6</sup>) where *a*<sub class="lower-index">*i*</sub> is the maximum amount of water *i*-th tap can deliver per second.

The third line contains *n* integers *t*<sub class="lower-index">1</sub>, *t*<sub class="lower-index">2</sub>, ..., *t*<sub class="lower-index">*n*</sub> (1 ≤ *t*<sub class="lower-index">*i*</sub> ≤ 10<sup class="upper-index">6</sup>) — the temperature of water each tap delivers.
none
2 100
3 10
50 150
6.000000000000000
3 9
5 5 30
6 6 10
40.000000000000000
2 12
1 3
10 15
1.666666666666667
20 30
70 97 14 31 83 22 83 56 19 87 59 7 7 89 24 82 34 40 6 24
10 4 47 46 11 18 32 55 16 32 53 37 43 32 41 46 57 14 60 44
916.518518518518519
1 1
1000000
1
1000000.000000000000000
1 200
1000000
100
0.000000000000057
1 1000000
1000000
1000000
999999.999999999944407
def solve():
    _,T=map(int,input().split())
    a=list(map(int,input().split()))
    b,c,total1,total2=[],[],0,0
    for i,t in enumerate(map(int,input().split())):
        if t < T:
            b.append((T-t,i))
            total1 += (T-t)*a[i]
        else:
            c.append((t-T,i))
            total2 += (t-T)*a[i]
    b.sort()
    c.sort()
    while len(b) != 0 and len(c) != 0:
        if total1-b[-1][0]*a[b[-1][1]] >= total2:
            total1 -= b[-1][0]*a[b[-1][1]]
            b.pop()
            continue
        if total2-c[-1][0]*a[c[-1][1]] >= total1:
            total2 -= c[-1][0]*a[c[-1][1]]
            c.pop()
            continue
        answer=0
        for _,i in b:
            answer += a[i]
        for _,i in c:
            answer += a[i]
        if total1 > total2:
            answer -= a[b[-1][1]]
            answer += (total2-total1+b[-1][0]*a[b[-1][1]])/b[-1][0]
        else:
            answer -= a[c[-1][1]]
            answer += (total1-total2+c[-1][0]*a[c[-1][1]])/c[-1][0]
        print(answer)
        return
    print(0)
solve()