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.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.InputMismatchException;
///import java.util.Scanner;
public class Problem {
    
    
    public static void main(String[] args) {
        int n,d;
        InputReader sc=new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
       // Scanner sc=new Scanner(System.in);
        n=sc.nextInt();
        d=sc.nextInt();
        long h[]=new long[n];
        int i,j;
        ArrayList<Long> list=new ArrayList<>();
        for(i=0;i<n;i++){
            h[i]=sc.nextLong();
            list.add(h[i]);
            list.add(h[i]-d);
            list.add(h[i]+d);
        }
        Collections.sort(list);
        int sz=0;
        HashMap<Long,Integer> hm=new HashMap<>();
        long temp=-1;
        for(i=0;i<list.size();i++){
            if(i==0) {
                hm.put(list.get(i), i);
                temp=list.get(i);
                sz++;
            }
            else{
                if(temp!=list.get(i)){
                    hm.put(list.get(i), sz);
                    temp=list.get(i);
                    sz++;
                }
            }
        }
        //for(i=0;i<list.size();i++){
           // System.out.print(list.get(i)+" ");
      //  }
        //System.out.println("");
        SegmentTree st=new SegmentTree(sz);
        st.update(0, sz-1, 0, hm.get(h[0]), 1, 0);
        
       // st.printseg();
        Node m1,m2;
        long sum[]=new long[n];
        int index[]=new int[n];
        for(i=0;i<n;i++){
            sum[i]=1;
            index[i]=i;
        }
        for(i=1;i<n;i++){
            m1=st.query(0, sz-1, 0, hm.get(h[i]-d), 0);
            m2=st.query(0, sz-1,hm.get(h[i]+d) , sz-1, 0);
            m1=st.getM(m1, m2);
           // System.out.println("sum "+m1.sum+" index "+m1.index);
            if(m1.sum +1 > sum[i]){
                sum[i]=1+m1.sum;
                index[i]=m1.index;
            }
           // System.out.println("updating : "+sum[i]+" at "+i);
            st.update(0, sz-1, 0, hm.get(h[i]), sum[i], i);
        }
        //for(i=0;i<n;i++){
      //   System.out.print(sum[i]+" ");
      //  }
      // System.out.println();
       // for(i=0;i<n;i++){
        //    System.out.print(index[i]+" ");
        //}
       // System.out.println();
       int maxpo=-1;
       for(i=0;i<n;i++){
           if(i==0){
               maxpo=i;
           }
           else{
               if(sum[maxpo] < sum[i]){
                   maxpo=i;
               }
           }
       }
       // System.out.println(sum[maxpo]);
       ArrayList<Integer> ls=new ArrayList<>();
        long ht=maxpo;
        while(index[maxpo]!=maxpo){
           ls.add(maxpo+1);
            maxpo=index[maxpo];
        }
        ls.add(maxpo+1);
        out.println(ls.size());
        for(i=ls.size()-1;i>=0;i--){
            out.print(ls.get(i)+" ");
        }
        out.close();
    }
    
}

class Node{
    long sum;
    int index;
    Node(long val,int index){
        sum=val;
        this.index=index;
    }
}
class SegmentTree{
    Node arr[];
    int size;
    Node just=new Node(Integer.MIN_VALUE,-1);
    void printseg(){
        int i;
        for(i=0;i<9;i++){
            System.out.print(arr[i].sum+" ");
        }
    }
    public SegmentTree(int n) {
         arr=new Node[4*n];
         just.index=-1;
         size=n;
         just.sum=Integer.MIN_VALUE;
         build(0,n-1,0);
    }
    Node getM(Node x,Node y){
        if(x.sum > y.sum) return x;
        else return y;
    }
    void build(int ss,int se,int segi){
        if(ss==se)
        {
            arr[segi]=new Node(0,ss);
        }
        else{
            int mid=(ss+se)/2;
            build(ss, mid, 2*segi +1);
            build(mid+1, se, 2*segi +2);
            arr[segi]=getM(arr[2*segi +1], arr[2*segi +2]);
        }
    }
    Node query(int ss,int se,int qs,int qe,int segi){
        //System.out.println(ss+" "+se+" "+qs+" "+qe+" "+segi);
        if(ss> qe || se<qs) {return just; }
        if(qs<=ss && qe>=se){
            return arr[segi];
        }
        else{
            int mid=ss+se;
            mid/=2;
            return getM(query(ss,mid,qs,qe,2*segi +1),query(mid+1,se,qs,qe,2*segi +2));
        }
    }
    void update(int ss,int se,int segi,int updi,long val,int ind){
        //System.out.println(ss+" "+se+" "+segi+" "+updi+" "+val+" "+ind);
        if(ss > (size-1) || se> (size -1)) return;
        if(updi< ss || updi> se) return;
        
        if(ss==se && updi==ss){
            arr[segi].sum=val;
            arr[segi].index=ind;
            
        }
        else {
            int mid=ss+se;
            mid/=2;        
            update(ss, mid, 2*segi +1, updi, val, ind);
            update(mid+1, se, 2*segi +2, updi, val, ind);
            arr[segi]=getM(arr[2*segi +1], arr[2*segi +2]);
        }
    }
}
class InputReader {

		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;

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

		public int snext() {
			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 = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

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

		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}

		public long[] nextLongArray(int n) {
			long a[] = new long[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextLong();
			}
			return a;
		}
                
		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}

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

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

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