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.List;
import java.util.Arrays;
import java.util.SplittableRandom;
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 Pradyumn
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastReader in = new FastReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskE solver = new TaskE();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskE {
        static final int oo = Integer.MAX_VALUE >> 1;

        public void solve(int testNumber, FastReader in, PrintWriter out) {
            int n = in.nextInt();
            int d = in.nextInt();
            long[] a = in.nextLongArray(n);
            long[] b = a.clone();
            ArrayUtils.sort(b);
            TaskE.SegmentTree segmentTree = new TaskE.SegmentTree(n);
            int[] dp = new int[n];
            ArrayUtils.fill(dp, 1);
            int[] prev = new int[n];
            ArrayUtils.fill(prev, -1);
            for (int i = 0; i < n; ++i) {
                int low = -1;
                int high = n;
                while (high - low > 1) {
                    int mid = (high + low) >>> 1;
                    if (b[mid] <= a[i] - d) {
                        low = mid;
                    } else {
                        high = mid;
                    }
                }
                if (low != -1) {
                    int[] vals = segmentTree.query(0, low);
                    if (vals[0] != -oo) {
                        if (dp[i] < vals[0] + 1) {
                            dp[i] = vals[0] + 1;
                            prev[i] = vals[1];
                        }
                    }
                }
                low = -1;
                high = n;
                while (high - low > 1) {
                    int mid = (high + low) >>> 1;
                    if (b[mid] >= a[i] + d) {
                        high = mid;
                    } else {
                        low = mid;
                    }
                }
                if (high != n) {
                    int[] vals = segmentTree.query(high, n - 1);
                    if (vals[0] != -oo) {
                        if (dp[i] < vals[0] + 1) {
                            dp[i] = vals[0] + 1;
                            prev[i] = vals[1];
                        }
                    }
                }
                low = -1;
                high = n;
                while (high - low > 1) {
                    int mid = (high + low) >>> 1;
                    if (b[mid] <= a[i]) {
                        low = mid;
                    } else {
                        high = mid;
                    }
                }
                segmentTree.update(low, dp[i], i);
            }
            int last = -1;
            for (int i = 0; i < n; ++i) {
                if (last == -1 || dp[last] < dp[i]) {
                    last = i;
                }
            }
            out.println(dp[last]);
            List<Integer> ans = new ArrayList<>();
            while (last != -1) {
                ans.add(last + 1);
                last = prev[last];
            }
            Collections.reverse(ans);
            for (int i = 0; i < ans.size(); ++i) {
                if (i != 0) out.print(" ");
                out.print(ans.get(i));
            }
            out.println();
        }

        static class SegmentTree {
            Pair[] seg;
            int n;
            int size;

            public SegmentTree(int n) {
                this.n = n;
                size = n << 2;
                seg = new Pair[size];
                build(0, n - 1, 0);
            }

            private void build(int s, int e, int c) {
                if (s == e) {
                    seg[c] = new Pair(-oo, -1);
                    return;
                }
                int m = (s + e) >>> 1;
                build(s, m, 2 * c + 1);
                build(m + 1, e, 2 * c + 2);
                seg[c] = merge(seg[2 * c + 1], seg[2 * c + 2]);
            }

            public void update(int index, int value, int pos) {
                update(0, n - 1, 0, index, value, pos);
            }

            private void update(int s, int e, int c, int index, int value, int pos) {
                if (s == e) {
                    seg[c].num = value;
                    seg[c].index = pos;
                    return;
                }
                int m = (s + e) >>> 1;
                if (index <= m) {
                    update(s, m, 2 * c + 1, index, value, pos);
                } else {
                    update(m + 1, e, 2 * c + 2, index, value, pos);
                }
                seg[c] = merge(seg[2 * c + 1], seg[2 * c + 2]);
            }

            public int[] query(int l, int r) {
                Pair pair = query(0, n - 1, 0, l, r);
                return new int[]{pair.num, pair.index};
            }

            private Pair query(int s, int e, int c, int l, int r) {
                if (s > e || l > r || s > r || e < l) return new Pair(-oo, -1);
                if (s == e) {
                    return seg[c];
                }
                if (s >= l && e <= r) {
                    return seg[c];
                }
                int m = (s + e) >>> 1;
                return merge(query(s, m, 2 * c + 1, l, r), query(m + 1, e, 2 * c + 2, l, r));
            }

            private Pair merge(Pair left, Pair right) {
                if (left == null) return right;
                if (right == null) return left;
                if (left.num > right.num) return left;
                else return right;
            }

            class Pair {
                int num;
                int index;

                public Pair(int num, int index) {
                    this.num = num;
                    this.index = index;
                }

            }

        }

    }

    static class ArrayUtils {
        public static long[] sort(long[] a) {
            a = shuffle(a, new SplittableRandom());
            Arrays.sort(a);
            return a;
        }

        public static long[] shuffle(long[] a, SplittableRandom gen) {
            for (int i = 0, n = a.length; i < n; i++) {
                int ind = gen.nextInt(n - i) + i;
                long d = a[i];
                a[i] = a[ind];
                a[ind] = d;
            }
            return a;
        }

        public static void fill(int[] array, int value) {
            Arrays.fill(array, value);
        }

    }

    static class FastReader {
        private InputStream stream;
        private byte[] buf = new byte[8192];
        private int curChar;
        private int pnumChars;
        private FastReader.SpaceCharFilter filter;

        public FastReader(InputStream stream) {
            this.stream = stream;
        }

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

        public int nextInt() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            int res = 0;
            do {
                if (c == ',') {
                    c = pread();
                }
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long nextLong() {
            int c = pread();
            while (isSpaceChar(c))
                c = pread();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = pread();
            }
            long res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = pread();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public long[] nextLongArray(int n) {
            long[] array = new long[n];
            for (int i = 0; i < n; i++) {
                array[i] = nextLong();
            }
            return array;
        }

        private boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        private static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        private interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }
}

