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.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Random;
import java.util.HashMap;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.Collections;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author ankur
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        segE solver = new segE();
        solver.solve(1, in, out);
        out.close();
    }

    static class segE {
        long[] ar;
        pair[] st;

        public void solve(int testNumber, InputReader in, PrintWriter out) {
            Random gen = new Random();
            int n = in.nextInt();
            int d = in.nextInt();
            long height[] = new long[n];
            ar = new long[n];
            ArrayList<Long> list = new ArrayList<>();
            for (int i = 0; i < n; i++) {
                height[i] = in.nextLong();
                list.add(height[i]);
                if (height[i] - d >= 0)
                    list.add(height[i] - d);
                if (height[i] + d <= 1e15)
                    list.add(height[i] + d);
            }
            //  System.out.println(list);
            // Arrays.sort(ar);
            Collections.sort(list);
            HashMap<Long, Integer> hm = new HashMap<>();
            int ctr = 0;
            hm.put(list.get(0), ctr);
            for (int i = 1; i < list.size(); i++) {
                if (list.get(i) != list.get(i - 1)) {
                    ctr++;
                    hm.put(list.get(i), ctr);
                }
            }
            st = new pair[4 * (ctr + 1) + 1];
            int maxasn = 0;
            int maxpos = -1;
            build(0, 0, (int) (ctr + 1));
            int dp[] = new int[n];
            for (int i = n - 1; i >= 0; i--) {
                long val4 = height[i] + d;
                long val3 = height[i] - d;
                // System.out.println(val3);
                int ans = 1;
                int pos = -1;
                if (hm.containsKey(val4)) {
                    int val1 = hm.get(val4);
                    pair p = get(0, 0, ctr + 1, val1, ctr + 1);
                    ans = ans + p.len;
                    pos = p.pos;
                }
                if (hm.containsKey(val3)) {
                    int val2 = hm.get(val3);
                    pair p = get(0, 0, ctr + 1, 0, val2);
                    if (ans < p.len + 1) {
                        ans = p.len + 1;
                        pos = p.pos;
                    }
                }
                if (maxasn < ans) {
                    maxasn = ans;
                    maxpos = i;
                }
                dp[i] = pos;
                pair p = new pair();
                p.len = ans;
                p.pos = i;
                update(0, 0, ctr + 1, hm.get(height[i]), hm.get(height[i]), p);
            }
            out.println(maxasn);
            for (int i = 0; i < maxasn; i++) {
                out.print((maxpos + 1) + " ");
                maxpos = dp[maxpos];

            }
        }

        public void build(int node, int start, int end) {
            if (start == end) {
                st[node] = new pair();
                st[node].len = 0;
                st[node].pos = 0;
                return;
            }
            int mid = (start + end) / 2;
            build(2 * node + 1, start, mid);
            build(2 * node + 2, mid + 1, end);
            pair p1 = st[node * 2 + 1];
            pair p2 = st[node * 2 + 2];
            st[node] = new pair();
            if (p1.len > p2.len) {
                st[node].len = p1.len;
                st[node].pos = p1.pos;
            }
            st[node].len = p2.len;
            st[node].pos = p2.pos;
        }

        public pair get(int node, int start, int end, int l, int r) {
            int mid = (start + end) / 2;
            if (start > end || l > end || r < start) {
                return new pair();//if lie outside return 0;
            }
            if (start >= l && end <= r) {
                // st[node]+=val*(end-start+1);
                return st[node];//if lie inside comp. return the node
            }
            pair p1 = get(2 * node + 1, start, mid, l, r);//p1 vaue from range s,mid
            pair p2 = get(2 * node + 2, mid + 1, end, l, r);//p2 value from range mide+1,r
            //st[node] = st[node * 2 + 1] + st[node * 2 + 2];
            //total value over range s,end
            return p1.len > p2.len ? p1 : p2;
        }

        public void update(int node, int start, int end, int l, int r, pair val) {
            int mid = (start + end) / 2;//the main purpose if u came there to any range update the lazy node else
            if (start > end || l > end || r < start) {
                return;//out of range
            }
            if (start >= l && end <= r) {// start and end lie inside int range completely
                st[node] = st[node].len > val.len ? st[node] : val;
                return;
            }//else lie partially
            update(2 * node + 1, start, mid, l, r, val);
            update(2 * node + 2, mid + 1, end, l, r, val);
            st[node] = st[node * 2 + 1].len > st[node * 2 + 2].len ? st[node * 2 + 1] : st[node * 2 + 2];
        }

        public class pair implements Comparable<pair> {
            int len;
            int pos;

            public int compareTo(pair o) {
                return this.len - o.len;
            }

        }

    }

    static class InputReader {
        private final InputStream stream;
        private final byte[] buf = new byte[8192];
        private int curChar;
        private int snumChars;

        public InputReader(InputStream st) {
            this.stream = st;
        }

        public int read() {
            //*-*------clare------

            if (snumChars == -1)
                throw new InputMismatchException();
            if (curChar >= snumChars) {
                curChar = 0;
                try {
                    snumChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (snumChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            long res = 0;
            do {
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}

