H. Maka
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Auchenai is playing a long series of $$$n$$$ Riichi Mahjong games. After each game, he receives a positive performance feedback score from the MAKA AI and records his placement tier.

For the $$$i$$$-th game, let $$$a_i$$$ be MAKA's feedback score and $$$b_i\in \{1, 2\}$$$ be Auchenai's placement tier. A subsequence of games is called calm if the placement tiers are nondecreasing.

Given an integer $$$K$$$, Auchenai wants to know the maximum length $$$L$$$ of a calm subsequence whose average MAKA score is at least $$$K$$$. That is, the maximum $$$L$$$ such that there exists a sequence $$$1\le i_1\le i_2\le\ldots \le i_L\le n$$$ satisfying $$$b_{i_1} \leq b_{i_2}\le \ldots \leq b_{i_L}$$$ and $$$$$$\frac{a_{i_1} + a_{i_2}+\cdots + a_{i_L}}{L}\geq K.$$$$$$

If no such subsequence exists, output $$$0$$$.

Input

The first line contains two integers $$$n$$$ and $$$K$$$ ($$$1 \leq n \leq 2 \cdot 10^5$$$, $$$1 \leq K \leq 10^9$$$) — the number of games and the desired average MAKA score.

The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots , a_n$$$ ($$$1 \leq a_i \leq 10^9$$$) — the MAKA scores.

The third line contains $$$n$$$ integers $$$b_1, b_2, \ldots , b_n$$$ ($$$b_i\in \{1, 2\}$$$) — the placement tiers.

Output

Output a single integer — the maximum length $$$L$$$ of a calm subsequence with average MAKA score at least $$$K$$$.

Examples
Input
5 4
5 4 6 4 3
1 1 2 2 2
Output
5
Input
8 6
9 2 8 7 1 2 10 6
1 2 1 2 1 1 2 2
Output
6
Input
8 8
3 9 3 9 3 9 3 9
1 2 1 2 1 2 1 2
Output
4