Il Derby della Madonnina

아직 제출이 없습니다시간 제한2초메모리 제한2048 MB

문제

The derby between Milan and Inter is happening soon, and you have been chosen as the assistant referee for the match, also known as linesman. Your task is to move along the touch-line, namely the side of the field, always looking very carefully at the match to check for offside positions and other offences.

Football is an extremely serious matter in Italy, and thus it is fundamental that you keep very close track of the ball for as much time as possible. This means that you want to maximise the number of kicks which you monitor closely. You are able to monitor closely a kick if, when it happens, you are in the position along the touch-line with minimum distance from the place where the kick happens.

Fortunately, expert analysts have been able to accurately predict all the kicks which will occur during the game. That is, you have been given two lists of integers, t_1t\_1, \dots, t_nt\_n and a_1a\_1, \dots, a_na\_n, indicating that t_it\_i seconds after the beginning of the match the ball will be kicked and you can monitor closely such kick if you are at the position a_ia\_i along the touch-line.

At the beginning of the game you start at position 00 and the maximum speed at which you can walk along the touch-line is vv units per second (i.e., you can change your position by at most vv each second). What is the maximum number of kicks that you can monitor closely?

입력

The first line contains two integers nn and vv (1n21051 ≤ n ≤ 2 · 10^5, 1v1061 ≤ v ≤ 10^6) — the number of kicks that will take place and your maximum speed. The second line contains nn integers t_1t\_1, \dots, t_nt\_n (1t_i1091 ≤ t\_i ≤ 10^9) — the times of the kicks in the match. The sequence of times is guaranteed to be strictly increasing, i.e., t_1<t_2<<t_nt\_1 < t\_2 < \cdots < t\_n. The third line contains nn integers a_1a\_1, \dots, a_na\_n (109a_i109-10^9 ≤ a\_i ≤ 10^9) — the positions along the touch-line where you have to be to monitor closely each kick.

출력

Print the maximum number of kicks that you can monitor closely.