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.*;
import java.util.*;

public class Main{
    final boolean isFileIO = false; 
    BufferedReader in;
    PrintWriter out;
    StringTokenizer st = new StringTokenizer("");
    String delim = " ";

    public static void main(String[] args) throws IOException {
        Main m = new Main();
        m.initIO();
        m.solve();
        m.in.close();
        m.out.close();
    }

    public void initIO() throws IOException {
        if(!isFileIO) {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
        } else {
            in = new BufferedReader(new FileReader("input.txt"));
            out = new PrintWriter("output.txt"); 
        }
    }
  
    String nextToken() throws IOException {
        if(!st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken(delim);
    }
 
    String readLine() throws IOException {
        return in.readLine();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    long nextLong() throws IOException {
        return Long.parseLong(nextToken());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(nextToken());
    }

    class Pillar implements Comparable<Pillar> {
        public int ind;
        public long h;
        public int l, r;
        public Pillar(int ind, long h) {
            this.ind = ind;
            this.h = h;
        }

        public int compareTo(Pillar pillar) {
            if(this.h < pillar.h)
                return -1;
            if(this.h > pillar.h)
                return 1;
            return 0;
        }
    }
    public void solve() throws IOException {
        int n = nextInt();
        long d = nextLong();
        long[] h = new long[n];
        ArrayList<Pillar> pillars = new ArrayList<Pillar>();
        for(int i = 0; i < n; i++) {
            h[i] = nextLong();
            pillars.add(new Pillar(i, h[i]));
        }
        Collections.sort(pillars);
        int[] pillarsByPos = new int[n];
        for(int i = 0; i < n; i++) {
            pillarsByPos[pillars.get(i).ind] = i;
        }
        int[][] bounds = new int[n][2];
        {
            int left, right;
            left = -1;
            right = 0;
            for(int i = 0; i < n; i++) {
                for(int j = left + 1; j < n; j++) {
                    if(Math.abs(pillars.get(i).h - pillars.get(j).h) >= d) {
                        left = j;
                    } else {
                        break;
                    }
                }
                bounds[i][0] = left;
                for(; right < n; right++) {
                    if(Math.abs(pillars.get(i).h - pillars.get(right).h) >= d) {
                        break;
                    }
                }
                bounds[i][1] = right;
            }
        }
        int[] dp = new int[n];
        int[] indexes = new int[n];
        SegmentTree st = new SegmentTree(dp);
        for(int i = 0; i < n; i++) {
            int pos = pillarsByPos[i];
            int left = bounds[pos][0];
            int right = bounds[pos][1];
            Pair resLeft = new Pair();
            Pair resRight = new Pair();
            st.rmq_max(0, left, 0, st.size - 1, 0, resLeft);
            st.rmq_max(right, n - 1, 0, st.size - 1, 0, resRight);
            Pair max = (resLeft.val > resRight.val ? resLeft : resRight);
            //out.println(left + " " + right);
            //out.println(resLeft + " " + resRight);

            if(max.val == 0) {
                indexes[i] = i;
            } else {
                indexes[i] = pillars.get(max.pos).ind;
            }
            dp[i] = max.val + 1;
            st.update(pos, dp[i], 0, st.size - 1, 0);
           //st.print();
        }
        int posOfMax = 0;
        int max = 0;
        for(int i = 0; i < n; i++) {
            if(max < dp[i]) {
                max = dp[i];
                posOfMax = i;
            }
        }
        out.println(max);
        ArrayDeque<Integer> path = new ArrayDeque<Integer>();
        path.push(posOfMax);
        while(indexes[posOfMax] != posOfMax) {
            posOfMax = indexes[posOfMax];
            path.push(posOfMax);
        }
        while(path.size() != 0) {
            out.print((path.pop() + 1) + " ");
        }
        out.println();
    }

    class Pair {
        int val, pos;

        public String toString() {
            return String.format("<%d %d>", pos, val);
        }
    }

    class SegmentTree {
        Pair[] b;
        public int size;
        public SegmentTree(int[] a) {
            int n = a.length;
            int exp = 0;
            for(int i = 0; i < 18; i++) {
                if((n & (1 << i)) == (1 << i)) {
                    exp = i;
                }
            }
            int size = (1 << (exp + 2)) - 1;
            this.size = (1 << (exp + 1));
            b = new Pair[size];
            for(int i = 0; i < size; i++) {
                b[i] = new Pair();
            }
            for(int i = size - this.size; i < size; i++) {
                b[i].pos = i - (size - this.size);
            }
            for(int i = size - this.size - 1; i >= 0; i--) {
                Pair leftNode = b[2 * i + 1];
                Pair rightNode = b[2 * i + 2];
                if(leftNode.val < rightNode.val) {
                    b[i].val = rightNode.val;
                    b[i].pos = rightNode.pos;
                } else {
                    b[i].val = leftNode.val;
                    b[i].pos = leftNode.pos;
                }
            }
        }

        public void rmq_max(int queryL, int queryR, int treeL, int treeR, int curNode, Pair res) {
            if(queryL > treeR || queryR < treeL) {
                return;
            }

            if(queryL == treeL && queryR == treeR) {
                if(res.val < b[curNode].val) {
                    res.val = b[curNode].val;
                    res.pos = b[curNode].pos;
                }
                return;
            }
            int mid = treeL + (treeR - treeL) / 2;

            rmq_max(queryL, Math.min(queryR, mid), treeL, mid, curNode * 2 + 1, res);
            rmq_max(Math.max(queryL, mid + 1), queryR, mid + 1, treeR, curNode * 2 + 2, res);
        }

        public void update(int i, int v, int treeL, int treeR, int curNode) {
            int mid = treeL + (treeR - treeL) / 2;
            if(treeL == treeR) {
                b[curNode].val = v;
                return;
            }
            if(i <= mid) {
                update(i, v, treeL, mid, curNode * 2 + 1);
            } else {
                update(i, v, mid + 1, treeR, curNode * 2 + 2);
            }
            Pair leftNode = b[curNode * 2 + 1];
            Pair rightNode = b[curNode * 2 + 2];
            if(leftNode.val < rightNode.val) {
                b[curNode].val = rightNode.val;
                b[curNode].pos = rightNode.pos;
            } else {
                b[curNode].val = leftNode.val;
                b[curNode].pos = leftNode.pos;
            }
        }

        public void print() {
            for(int i = 0; i < b.length; i++) {
                out.print(b[i] + " ");
            }
            out.println();
        }
    }

}
