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;
long long d, n, dp[100005], it[500005], it1[500005], pos2, recur[100005];
long long h[100005];
vector<pair<long long, long long> > height;
map<long long, long long> cnt;
vector<long long> ans;
vector<pair<long long, long long> > mem;
void update(int k, int l, int r, int pos, long long val) {
  if (r < pos || pos < l) return;
  if (l == pos && r == pos) {
    it[k] = val;
    it1[k] = height[pos].second;
    return;
  }
  int mid = (l + r) / 2;
  update(k * 2, l, mid, pos, val);
  update(k * 2 + 1, mid + 1, r, pos, val);
  it[k] = max(it[k * 2], it[k * 2 + 1]);
  if (it[k * 2] >= it[k * 2 + 1])
    it1[k] = it1[k * 2];
  else
    it1[k] = it1[k * 2 + 1];
}
long long get(int k, int l, int r, int L, int R) {
  if (r < L || R < l || L > R) return 0;
  if (L <= l && r <= R) return it[k];
  int mid = (l + r) / 2;
  return max(get(k * 2, l, mid, L, R), get(k * 2 + 1, mid + 1, r, L, R));
}
void go(int k, int l, int r, int L, int R) {
  if (r < L || R < l || L > R) return;
  if (L <= l && r <= R) {
    if (it[k] >= dp[pos2]) {
      pos2 = it1[k];
    }
    return;
  }
  int mid = (l + r) / 2;
  go(k * 2, l, mid, L, R);
  go(k * 2 + 1, mid + 1, r, L, R);
}
int main() {
  cin.tie(0), cout.tie(0), ios::sync_with_stdio(0);
  cin >> n >> d;
  for (int i = 1; i <= n; i++) {
    cin >> h[i];
    height.push_back(make_pair(h[i], i));
  }
  height.push_back(make_pair(LLONG_MIN, -1));
  sort(height.begin(), height.end());
  for (int i = 1; i <= n; i++) {
    int l = 1, r = n;
    while (l < r) {
      int mid = (l + r) / 2;
      if (height[mid].first >= h[i] + d)
        r = mid;
      else
        l = mid + 1;
    }
    int it = l;
    l = 1, r = n;
    while (l < r) {
      int mid = (l + r) / 2;
      if (h[i] - d < height[mid].first)
        r = mid;
      else
        l = mid + 1;
    }
    int it1 = l - 1;
    pos2 = 0;
    dp[i] = 0;
    if (height[it].first >= h[i] + d) {
      dp[i] = get(1, 1, n, it, n) + 1;
      go(1, 1, n, it, n);
    }
    if (height[it1].first <= h[i] - d) {
      if (get(1, 1, n, 1, it1) + 1 >= dp[i]) {
        go(1, 1, n, 1, it1);
        dp[i] = max(get(1, 1, n, 1, it1) + 1, dp[i]);
      }
    }
    dp[i] = max(dp[i], 1LL);
    if (dp[i] == 1)
      recur[i] = i;
    else {
      recur[i] = pos2;
    }
    int it2 = lower_bound(height.begin(), height.end(),
                          pair<long long, long long>(h[i], -1)) -
              height.begin() + cnt[h[i]];
    cnt[h[i]]++;
    update(1, 1, n, it2, dp[i]);
  }
  long long pos1, val, max1 = 0;
  for (int i = 1; i <= n; i++) {
    if (max1 < dp[i]) {
      pos1 = i;
      max1 = max(max1, dp[i]);
    }
  }
  cout << max1 << "\n";
  while (max1 != 0) {
    ans.push_back(pos1);
    max1 = max1 - 1;
    pos1 = recur[pos1];
  }
  for (int i = ans.size() - 1; i >= 0; i--) {
    cout << ans[i] << " ";
  }
}
