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;
template <typename T>
class TreapSet {
 public:
  TreapSet() : root(0) {}
  void insert(T value, int v, int index) {
    Node* leftPart;
    Node* rightPart;
    split(root, leftPart, rightPart, value);
    Node* cur = new Node(value, v, index);
    merge(leftPart, leftPart, cur);
    merge(root, leftPart, rightPart);
  }
  int getUpper(T value) {
    Node* leftPart;
    Node* rightPart;
    split(root, leftPart, rightPart, value);
    int res = -1;
    if (rightPart) {
      res = rightPart->maxIndex;
    }
    merge(root, leftPart, rightPart);
    return res;
  }
  int getLower(T value) {
    Node* leftPart;
    Node* rightPart;
    split(root, leftPart, rightPart, value);
    int res = -1;
    if (leftPart) {
      res = leftPart->maxIndex;
    }
    merge(root, leftPart, rightPart);
    return res;
  }
  virtual ~TreapSet() { delete root; }

 private:
  struct Node {
    T key;
    long long prior;
    int value;
    int max;
    int index;
    int maxIndex;
    Node* left;
    Node* right;
    long long random() {
      long long res = 0;
      for (int i = 0; i < 4; i++) {
        res += rand();
        res = res << 16;
      }
      return res;
    }
    Node(T key, int value, int index)
        : key(key),
          prior(random()),
          value(value),
          max(value),
          index(index),
          maxIndex(index),
          left(0),
          right(0){};
    virtual ~Node() {
      if (left) {
        delete left;
      }
      if (right) {
        delete right;
      }
    }
  };
  Node* root;
  void update(Node* node) {
    if (node) {
      int leftMax = safetyGetMax(node->left);
      int rightMax = safetyGetMax(node->right);
      if (leftMax >= rightMax && leftMax >= node->value) {
        node->max = leftMax;
        node->maxIndex = safetyGetMaxIndex(node->left);
      } else if (rightMax >= leftMax && rightMax >= node->value) {
        node->max = rightMax;
        node->maxIndex = safetyGetMaxIndex(node->right);
      } else {
        node->max = node->value;
        node->maxIndex = node->index;
      }
    }
  }
  int safetyGetMax(Node* node) { return node ? node->max : 0; }
  int safetyGetMaxIndex(Node* node) { return node ? node->maxIndex : -1; }
  void merge(Node*& t, Node* l, Node* r) {
    if (!l || !r) {
      t = l ? l : r;
      return;
    }
    if (l->prior > r->prior) {
      merge(l->right, l->right, r);
      t = l;
    } else {
      merge(r->left, l, r->left);
      t = r;
    }
    update(t);
  }
  void split(Node* t, Node*& l, Node*& r, T key) {
    if (!t) {
      l = r = 0;
      return;
    }
    if (key < t->key) {
      split(t->left, l, t->left, key);
      r = t;
    } else {
      split(t->right, t->right, r, key);
      l = t;
    }
    update(l);
    update(r);
  }
};
class Solution {
 public:
  Solution() {}
  void run() {
    int n = readInt();
    long long d = readInt();
    long long* h = new long long[n];
    for (int i = 0; i < n; i++) {
      cin >> h[i];
    }
    int* p = new int[n];
    int* maxD = new int[n];
    TreapSet<long long>* set = new TreapSet<long long>();
    p[n - 1] = -1;
    maxD[n - 1] = 1;
    set->insert(h[n - 1], maxD[n - 1], n - 1);
    for (int i = n - 2; i >= 0; i--) {
      long long up = h[i] + d;
      long long down = h[i] - d;
      int maxIndexUp = set->getUpper(up - 1);
      int maxIndexDown = set->getLower(down);
      if (maxIndexDown == -1 && maxIndexUp == -1) {
        p[i] = -1;
        maxD[i] = 1;
      } else if (maxIndexDown == -1) {
        p[i] = maxIndexUp;
        maxD[i] = maxD[p[i]] + 1;
      } else if (maxIndexUp == -1) {
        p[i] = maxIndexDown;
        maxD[i] = maxD[p[i]] + 1;
      } else {
        int maxUp = maxD[maxIndexUp];
        int maxDown = maxD[maxIndexDown];
        if (maxUp > maxDown) {
          p[i] = maxIndexUp;
          maxD[i] = maxD[p[i]] + 1;
        } else {
          p[i] = maxIndexDown;
          maxD[i] = maxD[p[i]] + 1;
        }
      }
      set->insert(h[i], maxD[i], i);
    }
    int maxIndex = -1;
    for (int i = 0; i < n; i++) {
      if (maxIndex == -1 || maxD[maxIndex] < maxD[i]) {
        maxIndex = i;
      }
    }
    cout << maxD[maxIndex] << endl;
    while (maxIndex != -1) {
      cout << maxIndex + 1 << " ";
      maxIndex = p[maxIndex];
    }
  }
  virtual ~Solution() { cout.flush(); }

 private:
  int readInt() {
    int tmp;
    cin >> tmp;
    return tmp;
  }
  string readString() {
    string tmp;
    cin >> tmp;
    return tmp;
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  Solution s;
  s.run();
  return 0;
}
