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.HashSet;
import java.util.Arrays;
import java.io.FilterInputStream;
import java.io.BufferedInputStream;
import java.util.HashMap;
import java.util.ArrayList;
import java.io.InputStream;

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

    static class EPillars {
        pair[] tree;
        long[] dp;
        long[] pre;
        HashMap<Long, Integer> last;
        int n;
        long k;

        public void solve(int testNumber, ScanReader in, PrintWriter out) {
            n = in.scanInt();
            k = in.scanLong();
            tree = new pair[(n + 5) * 4];
            for (int i = 0; i < (n + 5) * 4; i++) tree[i] = new pair();
            last = new HashMap<>();
            dp = new long[n + 5];
            pre = new long[n + 5];
            Arrays.fill(pre, -1);
            Arrays.fill(dp, 0);
            long arr[] = new long[n + 1];
            HashSet<Long> hs = new HashSet<>();
            for (int i = 1; i <= n; i++) {
                arr[i] = in.scanLong();
                hs.add(arr[i]);
            }
            long s[] = new long[hs.size()];
            int y = 0;
            for (long tt : hs) s[y++] = tt;
            Arrays.sort(s);


            for (int i = 1; i <= n; i++) {
                int cur = CodeX.lbound(s, 0, s.length, arr[i]);
                if (arr[i] + k <= s[s.length - 1]) {
                    int d = CodeX.lbound(s, 0, s.length, arr[i] + k);
                    while (d < s.length && s[d] - k < arr[i]) d++;
                    pair g = get(1, 0, s.length - 1, d, s.length - 1);
                    if (g.dp + 1 > dp[i]) {
                        dp[i] = g.dp + 1;
                        pre[i] = (g.hi == 0) ? -1 : last.get(g.hi);
                    }
                }


                if (arr[i] - k >= s[0]) {
                    int d = CodeX.ubound(s, 0, s.length, arr[i] - k) - 1;
                    while (d >= 0 && s[d] + k > arr[i]) d--;
                    pair g = get(1, 0, s.length - 1, 0, d);
                    if (g.dp + 1 > dp[i]) {
                        dp[i] = g.dp + 1;
                        pre[i] = (g.hi == 0) ? -1 : last.get(g.hi);
                    }
                }


                if (dp[i] == 0) {
                    dp[i] = 1;
                    pre[i] = -1;
                }
                update(1, 0, s.length - 1, cur, new pair(dp[i], arr[i]));
                last.put(arr[i], i);
            }


            int mx = 0;
            for (int i = 1; i <= n; ++i) if (dp[i] > dp[mx]) mx = i;


            ArrayList<Integer> ans = new ArrayList<>();
            while (mx != -1) {
                ans.add(mx);
                mx = (int) pre[mx];
            }
            out.println(ans.size());
            for (int i = 0; i < ans.size(); ++i) out.print(ans.get(ans.size() - 1 - i) + " ");
            out.println();

        }

        pair max(pair p1, pair p2) {
            if (p1.dp > p2.dp) return p1;
            else if (p1.dp < p2.dp) return p2;
            else {
                if (p1.hi > -p2.hi) return p1;
                else return p2;
            }
        }

        pair get(int node, int L, int R, int l, int r) {
            if (L > r || R < l) return new pair(0, 0);
            if (l <= L && R <= r) return tree[node];
            int mid = (L + R) >> 1;
            return max(get(node + node, L, mid, l, r), get(node + node + 1, mid + 1, R, l, r));
        }

        void update(int node, int l, int r, int index, pair val) {
            if (l != r) {
                int mid = (l + r) >> 1;
                if (index <= mid) {
                    update(node + node, l, mid, index, val);
                } else {
                    update(node + node + 1, mid + 1, r, index, val);
                }


                tree[node] = max(tree[node + node], tree[node + node + 1]);
            } else {
                tree[node] = val;
            }
        }

        class pair {
            long dp;
            long hi;

            public pair(long dp, long hi) {
                this.dp = dp;
                this.hi = hi;
            }

            public pair() {
                this.dp = 0;
                this.hi = 0;
            }

        }

    }

    static class ScanReader {
        private byte[] buf = new byte[4 * 1024];
        private int INDEX;
        private BufferedInputStream in;
        private int TOTAL;

        public ScanReader(InputStream inputStream) {
            in = new BufferedInputStream(inputStream);
        }

        private int scan() {
            if (INDEX >= TOTAL) {
                INDEX = 0;
                try {
                    TOTAL = in.read(buf);
                } catch (Exception e) {
                    e.printStackTrace();
                }
                if (TOTAL <= 0) return -1;
            }
            return buf[INDEX++];
        }

        public int scanInt() {
            int I = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

        private boolean isWhiteSpace(int n) {
            if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1) return true;
            else return false;
        }

        public long scanLong() {
            long I = 0;
            int n = scan();
            while (isWhiteSpace(n)) n = scan();
            int neg = 1;
            if (n == '-') {
                neg = -1;
                n = scan();
            }
            while (!isWhiteSpace(n)) {
                if (n >= '0' && n <= '9') {
                    I *= 10;
                    I += n - '0';
                    n = scan();
                }
            }
            return neg * I;
        }

    }

    static class CodeX {
        public static int lbound(long array[], int l, int h, long x) {
            while (l < h) {
                int mid = (l + h) / 2;
                if (array[mid] >= x) h = mid;
                else l = mid + 1;
            }
            return l;
        }

        public static int ubound(long array[], int l, int h, long x) {
            while (l < h) {
                int mid = (l + h) / 2;
                if (array[mid] <= x) {
                    l = mid + 1;
                } else {
                    h = mid;
                }
            }
            return l;
        }

    }
}

