N,S = map(int,input().split()) P = list(map(int,input().split())) l = [(P[i],i + 1) for i in range(N)] l.sort() ans = [] for i in range(N): p,j = l[i] flag = True if i > 0: pp,jj = l[i-1] if p - pp <= S: flag = False if i < N - 1: pp,jj = l[i + 1] if pp - p <= S: flag = False if flag: ans.append(j) ans.sort() print(len(ans)) print(*ans)