import numpy as np
N, K = map(int, input().split())
A = []
for i in range(N):
    A.append(int(input()))
arr1 = np.array(A)
lower = (np.abs(arr1[:-1] - arr1[1:]) <= K)
print(np.append(arr1[0],arr1[1:][lower]))
while np.all(lower) == False:
    lower = (np.abs(arr1[:-1] - arr1[1:]) <= K)
    arr1 = np.append(arr1[0],arr1[1:][lower])
print(len(arr1))