A machine logs a daily calibration reading for n days. Define the drift after day i as (maximum reading among days 1..i) - (minimum reading among days 1..i). Given a tolerance value L, find the smallest day index i (1-indexed) at which the drift strictly exceeds L (drift > L). If the drift never exceeds L, even after all n days, print -1.
Input format
Line 1: two integers n L.
Line 2: n space-separated integers, the calibration reading for day 1, day 2, ..., day n.
Output format
A single integer: the smallest day index whose drift exceeds L, or -1.
Constraints
- 1 <= n <= 100000
- 0 <= L <= 2000000
- -1000000 <= reading <= 1000000