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 MAX = 1e5 + 5;
const int NINF = numeric_limits<int>::min();
struct segment_tree {
  int arr[MAX];
  pair<int, int> tree[MAX * 3];
  void build(int n, int b, int e) {
    if (b > e) return;
    if (b == e) {
      tree[n] = make_pair(arr[b], b);
      return;
    }
    build(2 * n, b, (b + e) / 2);
    build(2 * n + 1, (b + e) / 2 + 1, e);
    tree[n] = max(tree[2 * n], tree[2 * n + 1]);
  }
  void update(int n, int b, int e, int i, pair<int, int> v) {
    if (b > e || e < i || b > i) return;
    if (b == e) {
      tree[n] = v;
      return;
    }
    update(2 * n, b, (b + e) / 2, i, v);
    update(2 * n + 1, (b + e) / 2 + 1, e, i, v);
    tree[n] = max(tree[2 * n], tree[2 * n + 1]);
  }
  pair<int, int> query(int n, int b, int e, int i, int j) {
    if (b > e || i > j || b > j || i > e) return make_pair(NINF, -1);
    if (i <= b && e <= j) return tree[n];
    return max(query(2 * n, b, (b + e) / 2, i, j),
               query(2 * n + 1, (b + e) / 2 + 1, e, i, j));
  }
} seg_tree;
long long h[MAX];
int mapp[MAX], mapp2[MAX];
long long dp[MAX];
long long dp2[MAX];
bool compare(int i, int j) {
  if (h[i] == h[j]) return (i < j);
  return (h[i] < h[j]);
}
int main() {
  int n, d;
  cin >> n >> d;
  for (int i = 0; i < n; ++i) {
    cin >> h[i];
    seg_tree.arr[i] = -1;
    mapp[i] = i;
  }
  seg_tree.build(1, 0, n - 1);
  sort(mapp, mapp + n, compare);
  for (int i = 0; i < n; ++i) {
    mapp2[mapp[i]] = i;
  }
  int ma = 0;
  int ind;
  dp2[0] = -1;
  for (int i = 0; i < n; ++i) {
    pair<int, int> p1(NINF, -1);
    long long ls = h[i] - d, rs = h[i] + d;
    int l = 0, r = n - 1;
    while (l < r) {
      int m = (r + l + 1) / 2;
      if (h[mapp[m]] > ls) {
        r = m - 1;
      } else {
        l = m;
      }
    }
    if (r >= 0 && l <= n - 1 &&
        (h[mapp[r]] <= ls && ((r == n - 1) || h[mapp[r + 1]] > ls))) {
      p1 = seg_tree.query(1, 0, n - 1, 0, r);
    }
    l = 0, r = n - 1;
    while (l < r) {
      int m = (r + l) / 2;
      if (h[mapp[m]] < rs) {
        l = m + 1;
      } else {
        r = m;
      }
    }
    if (r >= 0 && l <= n - 1 &&
        (h[mapp[r]] >= rs && ((r == 0) || h[mapp[r - 1]] < rs))) {
      p1 = max(p1, seg_tree.query(1, 0, n - 1, r, n - 1));
    }
    if (p1.first < 0) {
      dp[i + 1] = 1;
      dp2[i + 1] = 0;
    } else {
      dp[i + 1] = p1.first + 1;
      dp2[i + 1] = p1.second;
    }
    if (dp[i + 1] > ma) {
      ma = dp[i + 1];
      ind = i + 1;
    }
    seg_tree.update(1, 0, n - 1, mapp2[i], make_pair(dp[i + 1], i + 1));
  }
  cout << ma << endl;
  vector<int> vv(ma, -1);
  --ma;
  while (dp2[ind] != -1) {
    vv[ma] = ind;
    ind = dp2[ind];
    --ma;
  }
  for (int i = 0; i < vv.size(); ++i) {
    cout << vv[i] << " ";
  }
  return 0;
}
