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.util.*;
import java.io.*;
import java.math.*;
public class SegmentTree{
    
    
    Node[] heap;
    int siz;
    
    public SegmentTree(int n){
        siz = (int) (2*Math.pow(2.0,Math.floor((Math.log((double)n)/Math.log(2.0)) + 1)));
        heap = new Node[siz];
        build(1,0,n);
    }
    
    void build(int v,int from,int size){
        
        heap[v] = new Node(0,0);
        heap[v].from = from;
        heap[v].to = from + size - 1;
        
        if(size!=1){
            
            build(2*v,from,size/2);
            build(2*v+1,from + size/2,size - size/2);
            
        }
        
    }
    
    Node max(int from,int to){
        return max(1,from,to);
    }
    
    Node max(int v,int from,int to){
        Node n = heap[v];
        if(contains(from,to,n.from,n.to)){
            return heap[v];
        }
        if(intersects(from,to,n.from,n.to)){
            Node left = max(2*v,from,to);
            Node right = max(2*v+1,from,to);
            if(left.nb>=right.nb) return left;
            else return right;
        }
        return new Node(0,0);
    }
    
    void update(int place,Node value){
        Node n = update(1,place,value);
    }
    
    Node update(int v,int place,Node value){
        
        Node n = heap[v];
        
        //System.out.println(n.from+" "+n.to+" "+place+" "+contains(n.from,n.to,place,place));
        
        if(!contains(n.from,n.to,place,place)){
            return n;
        }
        
        if(n.from==n.to) {
            n.nb = value.nb;
            n.pos = value.pos;
            //System.out.println(n.nb+" "+n.pos);
            return n;
        }
        
        Node left = update(v*2,place,value);
        Node right = update(v*2+1,place,value);
        
        if(left.nb>=right.nb){
            n.nb = left.nb;
            n.pos = left.pos;
            return n;
        } 
        else {
            n.nb = right.nb;
            n.pos = right.pos;
            return n;
        }
    }
    
    
    boolean contains(int from1,int to1,int from2,int to2){
        return (from2>=from1 && to2<=to1);
    }
    
    boolean intersects(int from1,int to1,int from2,int to2){
        return ((from1<=from2 && to1>=from2) || (from1>=from2 && from1<=to2));
    }
    
    
    
    
    static TreeMap<Integer,Long> id_h = new TreeMap<Integer,Long>();
    static TreeMap<Long,Integer> h_id = new TreeMap<Long,Integer>();
    
    static long[] h;
    static int[] next;
    static int size;
    
    //static int[] position;
    //static int[] dp;
    
    static void initialisation(int n){
        
        TreeSet<Long> ts = new TreeSet<Long>();
        for(int i=1;i<=n;i++) ts.add(h[i]);
        
        ts.add(-1*(long)Math.pow(10,18));
        ts.add((long)Math.pow(10,18));
        
        size = ts.size();
        
        //dp = new int[size];
        //position = new int[size];
        
        
        int ind = 0;
        for(long l:ts){
            
            id_h.put(ind,l);
            h_id.put(l,ind);
            ind++;
            
        }
        
        /*
        System.out.println(size);
        for(Map.Entry<Integer,Long> e:id_h.entrySet()) System.out.println(e.getKey()+" "+e.getValue());
        System.out.println("");
        for(Map.Entry<Long,Integer> e:h_id.entrySet()) System.out.println(e.getKey()+" "+e.getValue());
        */
        
        
    }
    
    static class Node{
        int pos;
        int nb;
        int from;
        int to;
        
        public Node(int pos,int nb){
            this.pos = pos;
            this.nb = nb;
        }
    }
    
    public static void main(String[] args)throws IOException{
                
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer st = new StringTokenizer(br.readLine());
        
        PrintWriter out = new PrintWriter(System.out);
        
        int n = Integer.parseInt(st.nextToken());
        long d = Long.parseLong(st.nextToken());
        
        h = new long[n+1];
        next = new int[n+1];
        st = new StringTokenizer(br.readLine());
        for(int i=1;i<=n;i++){
            h[i] = Long.parseLong(st.nextToken());
        }
        
        int[] rep = new int[n+1];
        
        initialisation(n);
        SegmentTree tree = new SegmentTree(size);
        
        for(int i=n;i>=1;i--){
            
            long up = h[i] + d;
            long down = h[i] - d;
            
            int idup = h_id.get(h_id.ceilingKey(up));
            int iddown = h_id.get(h_id.floorKey(down));
            
            /*
            System.out.println("          "+h[i]);
            System.out.println("up  :"+idup);
            System.out.println("down  :"+iddown);
            */
            
            Node nodup = tree.max(idup,size-1);
            Node noddown = tree.max(0,iddown);
            
            /*
            System.out.println("          "+h[i]);
            System.out.println("up  :"+nodup.pos+" "+nodup.nb);
            System.out.println("down  :"+noddown.pos+" "+noddown.nb);
            */
            
            Node node;
            if(nodup.nb>=noddown.nb) node = nodup;
            else node = noddown;
            
            
            //System.out.println(node.pos+" "+node.nb);
            
            
            rep[i] = node.nb + 1;
            next[i] = node.pos;
            
            int id = h_id.get(h[i]);
            
            //System.out.println(id);
            
            if(rep[i]>tree.max(id,id).nb){
                //System.out.println(id+" "+rep[i]);
                tree.update(id,new Node(i,rep[i]));
            }
            
        }
        
        //for(int i=1;i<=n;i++) System.out.print(rep[i]+" ");
        //System.out.println("");
        
        int max = 0;
        int pos = 0;
        for(int i=1;i<=n;i++){
            if(rep[i]>max){
                max = rep[i];
                pos = i;
            }
        }
        
        out.println(max);
        out.print(pos+" ");
        
        while(next[pos]!=0){
            pos = next[pos];
            out.print(pos+" ");
        }
        
        out.flush();
        
    }
    
}