A furnace logs n temperature readings in order. An operating stretch is considered thermally stable if, across that contiguous stretch of readings, the difference between the highest and lowest reading is at most L.
Report the length of the longest contiguous stretch of readings that is thermally stable.
Input format
Line 1: two integers n and L.
Line 2: n space-separated integers, the readings in order.
Output format
A single integer: the length of the longest contiguous subarray whose (max - min) is at most L.
Constraints
- 1 <= n <= 100000
- 0 <= L <= 2000000000
- -1000000000 <= each reading <= 1000000000