N, S = map(int,input().split()) P = list(map(int, input().split())) if N == 1: print(1) print(1) exit() sp = [(P[i], i) for i in range(N)] sp.sort() ans = [] if sp[1][0] - sp[0][0] > S: ans.append(sp[0][1] + 1) for i in range(1, N - 1): if sp[i + 1][0] - sp[i][0] > S and sp[i][0] - sp[i - 1][0] > S: ans.append(sp[i][1] + 1) if sp[-1][0] - sp[-2][0] > S: ans.append(sp[-1][1] + 1) print(len(ans)) print(*ans)