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;
long long const N = 312312;
long long const INF = 1e9 + 7;
long long n, a[N], d;
long long ne[N], pre[N], pos[N], dp[N], par[N];
pair<long long, long long> t[4 * N];
pair<long long, long long> get(long long v, long long tl, long long tr,
                               long long l, long long r) {
  if (l > r) return {-1LL, -1LL};
  if (tl == l && tr == r)
    return t[v];
  else {
    long long tm = (tl + tr) >> 1;
    return max(get(v + v, tl, tm, l, min(r, tm)),
               get(v + v + 1, tm + 1, tr, max(l, tm + 1), r));
    t[v] = max(t[v + v], t[v + v + 1]);
  }
}
void update(long long v, long long tl, long long tr, long long pos,
            long long val1, long long val2) {
  if (tl == tr) {
    t[v] = {val1, val2};
  } else {
    long long tm = (tl + tr) >> 1;
    if (pos <= tm)
      update(v + v, tl, tm, pos, val1, val2);
    else
      update(v + v + 1, tm + 1, tr, pos, val1, val2);
    t[v] = max(t[v + v], t[v + v + 1]);
  }
}
int main() {
  vector<pair<long long, long long> > v;
  scanf("%I64d", &n);
  scanf("%I64d", &d);
  for (long long c = 1; c <= n; c++) {
    scanf("%I64d", &a[c]);
    v.push_back({a[c], c});
    dp[c] = 1;
    par[c] = -1LL;
  }
  sort(v.begin(), v.end());
  for (long long c = 0; c < v.size(); c++) {
    pos[v[c].second] = c + 1;
    long long x = v[c].first + d;
    long long l = 0, r = v.size() - 1, ans = -1LL;
    while (l <= r) {
      long long mid = (l + r) >> 1;
      if (v[mid].first >= x)
        ans = mid, r = mid - 1;
      else
        l = mid + 1;
    }
    if (ans == -1LL)
      ans = n + 1;
    else
      ans++;
    ne[v[c].second] = ans;
    l = 0, r = v.size() - 1, ans = -1LL;
    x = v[c].first - d;
    while (l <= r) {
      long long mid = (l + r) >> 1;
      if (v[mid].first <= x)
        ans = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    if (ans == -1LL)
      ans = 0;
    else
      ans++;
    pre[v[c].second] = ans;
  }
  for (long long c = 1; c <= n; c++) {
    pair<long long, long long> prevlen = {-1LL, -1LL};
    pair<long long, long long> nextlen = {-1LL, -1LL};
    prevlen = get(1, 1, n, 1, pre[c]);
    nextlen = get(1, 1, n, ne[c], n);
    pair<long long, long long> bestanswer = max(prevlen, nextlen);
    if (bestanswer.first + 1 > dp[c]) {
      dp[c] = bestanswer.first + 1;
      par[c] = bestanswer.second;
    }
    update(1, 1, n, pos[c], dp[c], c);
  }
  long long ans = -1LL, ind = -1LL;
  for (long long c = 1; c <= n; c++) {
    if (dp[c] > ans) {
      ans = dp[c];
      ind = c;
    }
  }
  printf("%I64d\n", ans);
  vector<long long> path;
  for (long long c = ind; c != -1LL; c = par[c]) {
    path.push_back(c);
  }
  reverse(path.begin(), path.end());
  for (long long c = 0; c < path.size(); c++) {
    printf("%I64d ", path[c]);
  }
  return 0;
}
