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 N = 100005;
long long h[N], st[4 * N];
vector<pair<long long, long long> > v(N);
vector<long long> x;
long long pos[N], p[N], a[N];
vector<long long> ans;
void update(int ss, int se, int ind, int val, int i) {
  if (ss > se || ind > se || ind < ss) return;
  if (ss == se) {
    a[ind] = val;
    return;
  }
  int mid = (ss + se) / 2;
  update(ss, mid, ind, val, 2 * i + 1);
  update(mid + 1, se, ind, val, 2 * i + 2);
  if (a[st[2 * i + 1]] >= a[st[2 * i + 2]])
    st[i] = st[2 * i + 1];
  else
    st[i] = st[2 * i + 2];
}
long long query(int ss, int se, int l, int r, int i) {
  if (ss > se || r < ss || l > se) return -1;
  if (l <= ss && se <= r) {
    return st[i];
  }
  int ind1, ind2, mid;
  mid = (ss + se) / 2;
  ind1 = query(ss, mid, l, r, 2 * i + 1);
  ind2 = query(mid + 1, se, l, r, 2 * i + 2);
  if (ind1 == -1 && ind2 == -1) return -1;
  if (ind1 == -1) return ind2;
  if (ind2 == -1) return ind1;
  if (a[ind1] >= a[ind2])
    return ind1;
  else
    return ind2;
}
void build(int ss, int se, int i) {
  if (ss == se) {
    st[i] = ss;
    return;
  }
  int mid = (ss + se) / 2;
  build(ss, mid, 2 * i + 1);
  build(mid + 1, se, 2 * i + 2);
  if (a[st[2 * i + 1]] >= a[st[2 * i + 2]])
    st[i] = st[2 * i + 1];
  else
    st[i] = st[2 * i + 2];
}
int main() {
  long long n, d, i;
  cin >> n >> d;
  memset(p, -1, sizeof(p));
  for (i = 0; i < n; i++) {
    cin >> h[i];
    v[i].first = h[i];
    v[i].second = i;
  }
  sort(v.begin(), v.begin() + n);
  for (i = 0; i < n; i++) {
    pos[v[i].second] = i;
    x.push_back(v[i].first);
  }
  build(0, n - 1, 0);
  vector<long long>::iterator itv;
  for (i = 0; i < n; i++) {
    int d1 = -1, d2 = -1;
    itv = upper_bound(x.begin(), x.end(), h[i] - d);
    if (itv != x.begin()) {
      itv--;
      d1 = itv - x.begin();
    }
    itv = lower_bound(x.begin(), x.end(), h[i] + d);
    if (itv != x.end()) {
      d2 = itv - x.begin();
    }
    int i1 = -1, i2 = -1;
    if (d1 != -1) i1 = query(0, n - 1, 0, d1, 0);
    if (d2 != -1) i2 = query(0, n - 1, d2, n - 1, 0);
    if (i1 == -1 && i2 == -1) {
      update(0, n - 1, pos[i], 1, 0);
      p[pos[i]] = -1;
    } else if (i1 == -1)
      update(0, n - 1, pos[i], a[i2] + 1, 0), p[pos[i]] = i2;
    else if (i2 == -1)
      update(0, n - 1, pos[i], a[i1] + 1, 0), p[pos[i]] = i1;
    else {
      update(0, n - 1, pos[i], max(a[i1], a[i2]) + 1, 0);
      if (a[i1] >= a[i2])
        p[pos[i]] = i1;
      else
        p[pos[i]] = i2;
    }
    if (a[pos[i]] == 1) p[pos[i]] = -1;
  }
  int ansi = query(0, n - 1, 0, n - 1, 0);
  cout << a[ansi] << "\n";
  ans.push_back(v[ansi].second);
  while (p[ansi] != -1) {
    ansi = p[ansi];
    ans.push_back(v[ansi].second);
  }
  reverse(ans.begin(), ans.end());
  for (i = 0; i < ans.size(); i++) cout << ans[i] + 1 << " ";
  cout << "\n";
}
