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;
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
const int MAXN = 100010;
int segTree[MAXN << 2], idx[MAXN], revIdx[MAXN], dp[MAXN << 2], prevIdx[MAXN];
void build(int low, int high, int pos) {
  int mid = (low + high) >> 1;
  if (low == high)
    segTree[pos] = mid;
  else {
    build(low, mid, 2 * pos + 1);
    build(mid + 1, high, 2 * pos + 2);
    segTree[pos] = dp[segTree[2 * pos + 1]] > dp[segTree[2 * pos + 2]]
                       ? segTree[2 * pos + 1]
                       : segTree[2 * pos + 2];
  }
}
void update(int low, int high, int pos, int qPos, int val) {
  int mid = (low + high) >> 1;
  if (qPos > high || qPos < low)
    return;
  else if (low == high)
    dp[qPos] = val;
  else {
    update(low, mid, 2 * pos + 1, qPos, val);
    update(mid + 1, high, 2 * pos + 2, qPos, val);
    segTree[pos] = dp[segTree[2 * pos + 1]] > dp[segTree[2 * pos + 2]]
                       ? segTree[2 * pos + 1]
                       : segTree[2 * pos + 2];
  }
}
int query(int low, int high, int pos, int qLow, int qHigh) {
  int mid = (low + high) >> 1;
  if (qLow > high || qHigh < low)
    return 4e5 + 5;
  else if (qLow <= low && qHigh >= high)
    return segTree[pos];
  else {
    int lIdx = query(low, mid, 2 * pos + 1, qLow, qHigh);
    int rIdx = query(mid + 1, high, 2 * pos + 2, qLow, qHigh);
    return dp[lIdx] > dp[rIdx] ? lIdx : rIdx;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, d;
  cin >> n >> d;
  vector<long long> arr(n), tmp(n);
  vector<pair<long long, long long>> sorted(n);
  for (int i = 0; i < (n); ++i) {
    cin >> arr[i];
    tmp[i] = arr[i];
    sorted[i] = make_pair(arr[i], i);
  }
  sort(sorted.begin(), sorted.end());
  sort(arr.begin(), arr.end());
  for (int i = 0; i < (n); ++i) {
    idx[sorted[i].second] = i;
    revIdx[i] = sorted[i].second;
  }
  build(0, n - 1, 0);
  dp[int(4e5 + 5)] = -4e5 + 5;
  int maxLen = 0, maxIdx = -1;
  for (int i = 0; i < (n); ++i) {
    long long curEl = tmp[i];
    int lIdx = upper_bound(arr.begin(), arr.end(), curEl - d) - arr.begin() - 1;
    int rIdx = lower_bound(arr.begin(), arr.end(), curEl + d) - arr.begin();
    int leftMaxIdx = -1, rightMaxIdx = -1;
    if (lIdx >= 0) leftMaxIdx = query(0, n - 1, 0, 0, lIdx);
    if (rIdx < n) rightMaxIdx = query(0, n - 1, 0, rIdx, n - 1);
    if (leftMaxIdx == -1 && rightMaxIdx == -1) {
      update(0, n - 1, 0, idx[i], 1);
      prevIdx[i] = -1;
      if (maxLen < 1) {
        maxLen = 1;
        maxIdx = i;
      }
    } else if (leftMaxIdx == -1) {
      update(0, n - 1, 0, idx[i], dp[rightMaxIdx] + 1);
      if (dp[rightMaxIdx])
        prevIdx[i] = revIdx[rightMaxIdx];
      else
        prevIdx[i] = -1;
      if (maxLen < dp[rightMaxIdx] + 1) {
        maxLen = dp[rightMaxIdx] + 1;
        maxIdx = i;
      }
    } else if (rightMaxIdx == -1) {
      update(0, n - 1, 0, idx[i], dp[leftMaxIdx] + 1);
      if (dp[leftMaxIdx])
        prevIdx[i] = revIdx[leftMaxIdx];
      else
        prevIdx[i] = -1;
      if (maxLen < dp[leftMaxIdx] + 1) {
        maxLen = dp[leftMaxIdx] + 1;
        maxIdx = i;
      }
    } else {
      if (dp[leftMaxIdx] > dp[rightMaxIdx]) {
        prevIdx[i] = revIdx[leftMaxIdx];
        update(0, n - 1, 0, idx[i], dp[leftMaxIdx] + 1);
        if (maxLen < dp[leftMaxIdx] + 1) {
          maxLen = dp[leftMaxIdx] + 1;
          maxIdx = i;
        }
      } else {
        prevIdx[i] = revIdx[rightMaxIdx];
        update(0, n - 1, 0, idx[i], dp[rightMaxIdx] + 1);
        if (maxLen < dp[rightMaxIdx] + 1) {
          maxLen = dp[rightMaxIdx] + 1;
          maxIdx = i;
        }
      }
    }
    if (dp[idx[i]] == 1) prevIdx[i] = -1;
  }
  deque<int> ans;
  while (maxIdx != -1) {
    ans.push_front(maxIdx);
    maxIdx = prevIdx[maxIdx];
  }
  cout << ans.size() << '\n';
  for (int x : ans) cout << x + 1 << " ";
  cout << '\n';
  return 0;
}
