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;
pair<int, int> t[8 * 300000 + 5];
pair<int, int> combine(pair<int, int> a, pair<int, int> b) {
  if (a.first > b.first)
    return a;
  else
    return b;
}
pair<int, int> get_max(int v, int tl, int tr, int l, int r) {
  if (l > r) return make_pair(-1000000000, -1);
  if (l == tl && r == tr) return t[v];
  int tm = (tl + tr) / 2;
  return combine(get_max(v * 2, tl, tm, l, min(r, tm)),
                 get_max(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r));
}
void update(int v, int tl, int tr, int pos, pair<int, int> new_val) {
  if (tl == tr) {
    t[v] = new_val;
  } else {
    int 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]);
  }
}
int n, d, xam, idx, ans[300000 + 5];
vector<long long> v;
long long arr[300000 + 5];
vector<int> seq;
int main() {
  scanf("%d %d", &n, &d);
  xam = -1;
  for (int i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
    v.push_back(max(arr[i] - d, 0LL));
    v.push_back(min(arr[i] + d, 1000000000000000LL));
    v.push_back(arr[i]);
  }
  for (int i = 0; i <= 8 * 300000; i++) {
    t[i].second = -1;
  }
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
  for (int i = 0; i < n; i++) {
    pair<int, int> prev1, prev2;
    prev1.second = prev2.second = -1;
    if (arr[i] >= d) {
      auto it = lower_bound(v.begin(), v.end(), arr[i] - d) - v.begin();
      prev1 = get_max(1, 0, v.size() - 1, 0LL, it);
    }
    if (arr[i] + d <= 1000000000000000LL) {
      auto it = lower_bound(v.begin(), v.end(), arr[i] + d) - v.begin();
      prev2 = get_max(1, 0, v.size() - 1, it, v.size() - 1);
    }
    if (prev1.first > prev2.first) {
      auto it = lower_bound(v.begin(), v.end(), arr[i]) - v.begin();
      update(1, 0, v.size() - 1, it, make_pair(max(1, prev1.first + 1), i));
      ans[i] = prev1.second;
      if (xam < prev1.first + 1) {
        xam = prev1.first + 1;
        idx = i;
      }
    } else {
      auto it = lower_bound(v.begin(), v.end(), arr[i]) - v.begin();
      update(1, 0, v.size() - 1, it, make_pair(max(1, prev2.first + 1), i));
      ans[i] = prev2.second;
      if (xam < prev2.first + 1) {
        xam = prev2.first + 1;
        idx = i;
      }
    }
  }
  while (ans[idx] != -1) {
    seq.push_back(idx);
    idx = ans[idx];
  }
  seq.push_back(idx);
  reverse(seq.begin(), seq.end());
  printf("%d\n", seq.size());
  for (int i = 0; i < seq.size(); i++) {
    printf("%d", seq[i] + 1);
    if (i == seq.size() - 1)
      printf("\n");
    else
      printf(" ");
  }
}
