def f(N, S, P): A = sorted((P[i], i + 1) for i in range(N)) I = [A[i][1] for i in range(N) if (i == 0 or A[i][0] - A[i-1][0] > S) and (i == N-1 or A[i+1][0] - A[i][0] > S)] print(len(I)) print(*sorted(I)) f(*map(int, input().split()), list(map(int, input().split())))