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 n, d;
long long h[100001];
struct A {
  long long h;
  int i;
  bool operator<(const A &B) const { return h < B.h || h == B.h && i < B.i; }
} H[100001];
map<long long, int> MP;
map<long long, int> MPSORT;
int N, Kn;
int st[100001 << 2];
int sti[100001 << 2];
void init() {
  N = 1;
  while (N < Kn + 2) N <<= 1;
  memset(st, 0, sizeof(st));
  memset(sti, 0, sizeof(sti));
  st[N] = st[2 * N - 1] = -1;
}
int query(int L, int R, int &I) {
  int MAX = 0;
  I = 0;
  for (int s = N + L - 1, t = N + R + 1; s ^ t ^ 1; s >>= 1, t >>= 1) {
    if (~s & 1)
      if (MAX < st[s ^ 1]) MAX = st[s ^ 1], I = sti[s ^ 1];
    if (t & 1)
      if (MAX < st[t ^ 1]) MAX = st[t ^ 1], I = sti[t ^ 1];
  }
  return MAX;
}
void update(int X, int C, int Oldi) {
  int s = X + N;
  st[s] = C;
  sti[s] = Oldi;
  s >>= 1;
  while (s > 0) {
    if (st[s << 1] > st[s << 1 | 1])
      st[s] = st[s << 1], sti[s] = sti[s << 1];
    else
      st[s] = st[s << 1 | 1], sti[s] = sti[s << 1 | 1];
    s >>= 1;
  }
}
int BS1(long long X) {
  if (X < H[1].h) return 0;
  int L, R, M;
  L = 1, R = Kn + 1;
begin:
  if (L + 1 == R) goto end;
  M = (L + R) >> 1;
  if (H[M].h <= X)
    L = M;
  else
    R = M;
  goto begin;
end:
  return L;
}
int BS2(long long X) {
  if (X > H[Kn].h) return 0;
  int L, R, M;
  L = 0, R = Kn;
begin:
  if (L + 1 == R) goto end;
  M = (L + R) >> 1;
  if (H[M].h < X)
    L = M;
  else
    R = M;
  goto begin;
end:
  return R;
}
int dp[100001];
int pre[100001];
int main(void) {
  while (~scanf("%d%d", &n, &d)) {
    MP.clear();
    for (int i = 1; i <= n; ++i)
      scanf("%I64d", &h[i]), H[i].h = h[i], H[i].i = i;
    sort(H + 1, H + n + 1);
    Kn = 0;
    for (int i = 1; i <= n; ++i)
      if (!MP.count(H[i].h))
        MP[H[i].h] = ++Kn, H[Kn].h = H[i].h, H[Kn].i = H[i].i;
    init();
    for (int i = 1; i <= n; ++i) dp[i] = 1, pre[i] = i;
    for (int i = 1; i <= n; ++i) {
      int ANS, ANS1, ANS2, D;
      int D1 = BS1(h[i] - d), D2 = BS2(h[i] + d);
      if (D1)
        ANS1 = query(1, D1, D1);
      else
        ANS1 = 0;
      if (D2)
        ANS2 = query(D2, Kn, D2);
      else
        ANS2 = 0;
      if (ANS1 > ANS2)
        ANS = ANS1, D = D1;
      else
        ANS = ANS2, D = D2;
      if (ANS > 0) {
        dp[i] = ANS + 1;
        pre[i] = D;
      }
      update(MP[h[i]], dp[i], i);
    }
    int ANS = 0, ANSN;
    for (int i = 1; i <= n; ++i)
      if (dp[i] > ANS) ANS = dp[i], ANSN = i;
    printf("%d\n", ANS);
    vector<int> V;
    while (pre[ANSN] != ANSN) {
      V.push_back(ANSN);
      ANSN = pre[ANSN];
    }
    printf("%d", ANSN);
    for (int i = V.size() - 1; i >= 0; --i) printf(" %d", V[i]);
    cout << endl;
  }
  return 0;
}
