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;
int segtree[400005];
int par[100005];
vector<long long> val;
int tot[100005];
int idx[100005];
vector<pair<long long, int> > st;
int n, d;
int N;
int lowerbound(long long u) {
  int lo = 0, hi = N - 1, mid;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (val[mid] < u) {
      lo = mid + 1;
    } else {
      hi = mid - 1;
    }
  }
  return lo;
}
int upperbound(long long u) {
  int lo = 0, hi = N - 1, mid;
  while (lo <= hi) {
    mid = (lo + hi) / 2;
    if (val[mid] > u) {
      hi = mid - 1;
    } else {
      lo = mid + 1;
    }
  }
  return hi;
}
void build(int p, int L, int R) {
  if (L == R) {
    segtree[p] = L;
    return;
  }
  int M = (L + R) / 2;
  build(2 * p, L, M);
  build(2 * p + 1, M + 1, R);
  segtree[p] = segtree[2 * p];
}
int update(int p, int L, int R, int S, int T, long long v) {
  if (R < S || T < L) {
    return segtree[p];
  }
  if (S <= L && R <= T) {
    tot[segtree[p]] = v;
    return segtree[p];
  }
  int M = (L + R) / 2;
  int left = update(2 * p, L, M, S, T, v);
  int right = update(2 * p + 1, M + 1, R, S, T, v);
  if (left == -1)
    segtree[p] = right;
  else if (right == -1)
    segtree[p] = left;
  else
    segtree[p] = (tot[left] > tot[right] ? left : right);
  return segtree[p];
}
int rmq(int p, int L, int R, int S, int T) {
  if (R < S || T < L) {
    return -1;
  }
  if (S <= L && R <= T) {
    return segtree[p];
  }
  int M = (L + R) / 2;
  int left = rmq(2 * p, L, M, S, T);
  int right = rmq(2 * p + 1, M + 1, R, S, T);
  if (left == -1)
    return right;
  else if (right == -1)
    return left;
  return (tot[left] > tot[right] ? left : right);
}
void printout(int u) {
  if (par[u] == -1) {
    printf("%d", u + 1);
    return;
  }
  printout(par[u]);
  printf(" %d", u + 1);
}
int main() {
  scanf("%d%d", &n, &d);
  long long u;
  for (int i = 0; i < n; ++i) {
    scanf("%I64d", &u);
    val.push_back(u);
    st.push_back(make_pair(u, i));
  }
  if (d == 0) {
    printf("%d\n", n);
    for (int i = 1; i <= n; ++i) {
      if (i != 1) printf(" ");
      printf("%d", i);
    }
    printf("\n");
    return 0;
  }
  sort(val.begin(), val.end());
  int it = 0;
  while (it + 1 < val.size()) {
    if (val[it] == val[it + 1])
      val.erase(val.begin() + it);
    else
      ++it;
  }
  memset(par, -1, sizeof par);
  N = val.size();
  int ans = -1;
  int maxans = 0;
  build(1, 0, N - 1);
  for (int i = 0; i < n; ++i) {
    int cur = lowerbound(st[i].first);
    assert(st[i].first == val[cur]);
    int tmp = 1;
    idx[cur] = st[i].second;
    int k = upperbound(st[i].first - d);
    if (k >= 0) {
      int p = rmq(1, 0, N - 1, 0, k);
      if (tot[p] + 1 > tmp) {
        par[idx[cur]] = idx[p];
        tmp = tot[p] + 1;
      }
    }
    k = lowerbound(st[i].first + d);
    if (k < N) {
      int p = rmq(1, 0, N - 1, k, N - 1);
      if (tot[p] + 1 > tmp) {
        par[idx[cur]] = idx[p];
        tmp = tot[p] + 1;
      }
    }
    if (maxans < tmp) {
      ans = idx[cur];
      maxans = tmp;
    }
    update(1, 0, N - 1, cur, cur, tmp);
  }
  printf("%d\n", maxans);
  printout(ans);
  printf("\n");
  return 0;
}
