#include <bits/stdc++.h>
using namespace std;

int main() {
  int n, s; cin >> n >> s;
  vector<pair<int, int>> p(n);
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i;
  }
  sort(p.begin(), p.end());
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    bool ok = true;
    if (i - 1 >= 0 and p[i].first - p[i - 1].first <= s) ok = false;
    if (i + 1 < n and p[i + 1].first - p[i].first <= s) ok = false;
    if (ok) ans.push_back(p[i].second + 1);
  }
  cout << ans.size() << endl;
  sort(ans.begin(), ans.end());
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << (i + 1 == ans.size() ? "\n" : " ");
  }
}