Marmot found a row with n pillars. The i-th pillar has the height of hi meters. Starting from one pillar i1, Marmot wants to jump on the pillars i2, ..., ik. (1 ≤ i1 < i2 < ... < ik ≤ n). From a pillar i Marmot can jump on a pillar j only if i < j and |hi - hj| ≥ d, where |x| is the absolute value of the number x.

Now Marmot is asking you find out a jump sequence with maximal length and print it.

Input

The first line contains two integers n and d (1 ≤ n ≤ 105, 0 ≤ d ≤ 109).

The second line contains n numbers h1, h2, ..., hn (1 ≤ hi ≤ 1015).

Output

The first line should contain one integer k, the maximal length of a jump sequence.

The second line should contain k integers i1, i2, ..., ik (1 ≤ i1 < i2 < ... < ik ≤ n), representing the pillars' indices from the maximal length jump sequence.

If there is more than one maximal length jump sequence, print any.

Examples

Input

5 2
1 3 6 7 4


Output

4
1 2 3 5 


Input

10 3
2 1 3 6 9 11 7 3 20 18


Output

6
1 4 6 7 8 9 

Note

In the first example Marmot chooses the pillars 1, 2, 3, 5 with the heights 1, 3, 6, 4. Another jump sequence of length 4 is 1, 2, 4, 5.
#include <bits/stdc++.h>
using namespace std;
const long long N = 3e5 + 5;
pair<long long, long long> t[4 * N];
long long dp[N];
long long a[N];
long long par[N];
pair<long long, long long> combine(pair<long long, long long> a,
                                   pair<long long, long long> b) {
  if (a.first > b.first)
    return a;
  else
    return b;
}
pair<long long, long long> max_query(long long v, long long tl, long long tr,
                                     long long l, long long r) {
  if (l > r) return make_pair(-1, -1);
  if (l == tl && r == tr) {
    return t[v];
  }
  long long tm = (tl + tr) / 2;
  return combine(max_query(v * 2, tl, tm, l, min(r, tm)),
                 max_query(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r));
}
void update(long long v, long long tl, long long tr, long long pos,
            long long new_val) {
  if (tl == tr) {
    t[v].first = new_val;
    t[v].second = pos;
  } else {
    long long tm = (tl + tr) / 2;
    if (pos <= tm)
      update(v * 2, tl, tm, pos, new_val);
    else
      update(v * 2 + 1, tm + 1, tr, pos, new_val);
    t[v] = combine(t[v * 2], t[v * 2 + 1]);
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, d;
  cin >> n >> d;
  set<long long> allnum;
  map<long long, long long> compress;
  map<long long, long long> invcompress;
  map<long long, long long> valtoarr;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    allnum.insert(a[i]);
    allnum.insert(a[i] + d);
    if (a[i] - d >= 0) {
      allnum.insert(a[i] - d);
    }
  }
  long long assign = 0;
  for (auto it = allnum.begin(); it != allnum.end(); ++it) {
    compress[*it] = assign;
    invcompress[assign] = *it;
    assign++;
  }
  update(1, 0, allnum.size() - 1, compress[a[0]], 1);
  long long ans;
  long long finalans = 1;
  long long finalind = 0;
  valtoarr[a[0]] = 0;
  par[0] = -1;
  for (long long i = 1; i < n; i++) {
    if (a[i] >= d) {
      pair<long long, long long> o1 =
          max_query(1, 0, allnum.size() - 1, compress[*allnum.begin()],
                    compress[a[i] - d]);
      pair<long long, long long> o2 =
          max_query(1, 0, allnum.size() - 1, compress[a[i] + d],
                    compress[*allnum.rbegin()]);
      if (o1.first > o2.first) {
        ans = max(1 + o1.first, 1ll);
        if (ans == 1)
          par[i] = -1;
        else
          par[i] = valtoarr[invcompress[o1.second]];
      } else {
        ans = max(1 + o2.first, 1ll);
        if (ans == 1)
          par[i] = -1;
        else
          par[i] = valtoarr[invcompress[o2.second]];
      }
      if (ans > 0) update(1, 0, allnum.size() - 1, compress[a[i]], ans);
    } else {
      pair<long long, long long> o1 =
          max_query(1, 0, allnum.size() - 1, compress[a[i] + d],
                    compress[*allnum.rbegin()]);
      ans = max(1 + o1.first, 1ll);
      if (ans == 1)
        par[i] = -1;
      else
        par[i] = valtoarr[invcompress[o1.second]];
      if (ans > 0) update(1, 0, allnum.size() - 1, compress[a[i]], ans);
    }
    if (ans > finalans) {
      finalans = ans;
      finalind = i;
    }
    valtoarr[a[i]] = i;
  }
  cout << finalans << endl;
  vector<long long> path;
  long long ind = finalind;
  path.push_back(ind + 1);
  while (1) {
    ind = par[ind];
    if (ind == -1) break;
    path.push_back(ind + 1);
    if (ind == 0) break;
  }
  for (long long i = path.size() - 1; i > -1; i--) {
    cout << path[i] << " ";
  }
  cout << endl;
  return 0;
}
