Water cranes#8792

Water cranes

1 second
64 megabytes
Hard

Consider a system with taps that fill a container with water. Each tap, numbered from to , can be adjusted to deliver any volume of water from to a_i milliliters per second (this can be any real number). The water from the -th tap has a temperature t_i.

If you set the -th tap to deliver exactly x_i milliliters of water per second, the resulting water temperature is calculated as:

prb_11.jpg

Your task is to adjust all the taps so that the resulting temperature is exactly . Determine the maximum total volume of water per second that can be obtained at this temperature .

Input

The first line contains two integers and (1 \le n \le 2 \cdot 10^5, 1 \le T \le 10^6): the number of taps and the desired water temperature.

The second line contains integers a_1, a_2, \dots, a_n (1 \le a_i \le 10^6): the maximum volume of water each tap can deliver per second.

The third line contains integers t_1, t_2, \dots, t_n (1 \le t_i \le 10^6): the temperature of the water from each tap.

Output

Print the maximum possible total volume of water with temperature that can be obtained per second. If it is impossible to achieve the specified temperature, output .

Your answer will be accepted if its absolute or relative error does not exceed 10^{-3}.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading

Example 3

Loading
Loading