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 int kN = 1 << 17;
pair<int, int> Combine(const pair<int, int>& lhs, const pair<int, int>& rhs) {
  if (lhs.first > rhs.first) return lhs;
  if (rhs.first > lhs.first) return rhs;
  return lhs;
}
struct SegmentTree {
  vector<pair<int, int> > data;
  SegmentTree() { data.resize(2 * kN - 1, {-1, -1}); }
  int L(int i) { return i * 2 + 1; }
  int R(int i) { return i * 2 + 2; }
  void Set(int pos, int val, int id, int ind = 0, int tl = 0, int tr = kN - 1) {
    if (tl == tr) {
      data[ind] = {val, id};
      return;
    }
    int tm = (tl + tr) >> 1;
    if (pos <= tm)
      Set(pos, val, id, L(ind), tl, tm);
    else
      Set(pos, val, id, R(ind), tm + 1, tr);
    data[ind] = Combine(data[L(ind)], data[R(ind)]);
  }
  pair<int, int> Get(int l, int r, int ind = 0, int tl = 0, int tr = kN - 1) {
    if (l == tl && r == tr) {
      return data[ind];
    }
    int tm = (tl + tr) >> 1;
    if (r <= tm)
      return Get(l, r, L(ind), tl, tm);
    else if (tm < l)
      return Get(l, r, R(ind), tm + 1, tr);
    else
      return Combine(Get(l, tm, L(ind), tl, tm),
                     Get(tm + 1, r, R(ind), tm + 1, tr));
  }
};
int dp[kN];
int path[kN];
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, d;
  cin >> n >> d;
  vector<long long> arr(n);
  vector<pair<long long, int> > sarr(n);
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    sarr[i] = {arr[i], i};
  }
  sort(sarr.begin(), sarr.end());
  SegmentTree tree;
  for (int i = 0; i < n; ++i) {
    dp[i] = 1;
    path[i] = -1;
    long long xl = arr[i] - d;
    long long xr = arr[i] + d;
    int l =
        upper_bound(sarr.begin(), sarr.end(), pair<long long, int>(xl, kN)) -
        sarr.begin() - 1;
    int r =
        lower_bound(sarr.begin(), sarr.end(), pair<long long, int>(xr, -kN)) -
        sarr.begin();
    pair<int, int> lmax = l >= 0 ? tree.Get(0, l) : pair<int, int>(-1, -1);
    pair<int, int> rmax = r < n ? tree.Get(r, n - 1) : pair<int, int>(-1, -1);
    pair<int, int> ansmax = Combine(lmax, rmax);
    if (dp[i] < ansmax.first + 1) {
      dp[i] = ansmax.first + 1;
      path[i] = ansmax.second;
    }
    int upd_ind =
        lower_bound(sarr.begin(), sarr.end(), pair<long long, int>(arr[i], i)) -
        sarr.begin();
    tree.Set(upd_ind, dp[i], i);
  }
  int ind = max_element(dp, dp + kN) - dp;
  cout << dp[ind] << '\n';
  vector<int> ans;
  ans.push_back(ind);
  while (path[ind] != -1) {
    ind = path[ind];
    ans.push_back(ind);
  }
  reverse(ans.begin(), ans.end());
  for (auto x : ans) {
    cout << x + 1 << ' ';
  }
  return 0;
}
