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.*;

/**
 *
 * @author umang
 */

public class Problem {
    
    public static int mod = (int) (1e9+7);
    static long[] h;
    static HashMap<Long,Integer> map=new HashMap<>();
    static long d;
    static int[] par;
    public static long[] arr;
    
    public static class SegmentTree{
        Pair st[];
 
        SegmentTree(int n)  {
            st = new Pair[4*n];
            build(0, n-1, 1);
        }
    
        public int getMid(int s, int e) {
            return (s+e)>>1;
        }

        public Pair merge(Pair a,Pair b){
            if(a.x>b.x) return a;
            if(a.x==b.x && a.i>b.i) return a;
            return b;
        }
        
        public void update(int s, int e, int x, int y, long c, int d,int si){
            if(s == x && e == y){
                st[si]=new Pair(c,d);
            }
            else{
                int mid = getMid(s, e);
                if(y <= mid)    
                    update(s, mid, x, y, c, d,2*si);
                else if(x > mid)
                    update(mid + 1, e, x ,y ,c,d ,2*si + 1);
                else{
                    update(s, mid, x, mid, c, d,2*si);
                    update(mid + 1, e, mid + 1, y, c,d, 2*si + 1);
                }
                st[si]=merge(st[2*si],st[2*si+1]);
            }
        }

        public Pair get(int s, int e, int x, int y, int si){

            if(s == x && e == y){
                return st[si];
            }
            int mid = getMid(s, e);
            if(y <= mid)
                return get(s, mid, x, y, 2*si);
            else if(x > mid)
                return get(mid + 1, e, x, y, 2*si + 1);
            return merge(get(s, mid, x, mid, 2*si), get(mid + 1, e, mid + 1, y, 2*si + 1));
        }
        public void build(int ss, int se, int si){
            if (ss == se) {
                st[si] = new Pair(0, ss);
                return;
            }

            int mid = getMid(ss, se);
            build(ss, mid, si * 2 );
            build(mid + 1, se, si * 2 + 1);
            st[si]=merge(st[2*si],st[2*si+1]);
        }
    }
    
    public static void main(String[] args) {
 
        InputReader in = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        
        int n=in.nextInt();
        d=in.nextLong();
        h=new long[n];
        par=new int[n];
        ArrayList<Long> list=new ArrayList<>();
        for(int i=0;i<n;i++){
            h[i]=in.nextLong();
            list.add(h[i]);
            list.add(h[i]-d);
            list.add(h[i]+d);
            par[i]=i;
        }
        Collections.sort(list);
        int j=1;
        for(int i=0;i<list.size();i++){
            if(map.containsKey(list.get(i))) continue;;
            map.put(list.get(i), j++);
        }
        //debug(map);
        long max=1;
        int ind=n-1;
        SegmentTree segmentTree=new SegmentTree(j);
        segmentTree.update(0, j-1, map.get(h[n-1]), map.get(h[n-1]), 1,n-1, 1);
        for(int i=n-2;i>=0;i--){
            Pair p1=segmentTree.get(0, j-1, 0, map.get(h[i]-d), 1);
            Pair p2=segmentTree.get(0, j-1, map.get(h[i]+d), j-1, 1);
            if(p1.x<p2.x) p1=p2;
            //debug(p1,p2);
            segmentTree.update(0, j-1, map.get(h[i]), map.get(h[i]), p1.x+1,i, 1);
            if(p1.x!=0) par[i]=p1.i;
            if(p1.x+1>max){
                max=p1.x+1;
                ind=i;
            }
        }
        ArrayList<Integer> ans=new ArrayList<>();
        while(par[ind]!=ind){
            ans.add(ind+1);
            ind=par[ind];
        }
        ans.add(ind+1);
        out.println(ans.size());
        for(int i:ans) out.print(i+" ");
        
        out.close();
    }
    
    static class Pair implements Comparable<Pair>{

        String s;
        long x;
        int i;

        public Pair(long x,int i) {
            this.x=x;
            this.i=i;
        }
        
        
	public int compareTo(Pair o) {
            return this.s.compareTo(o.s);
        }

        @Override
        public String toString() {
            return x+" "+i;
        }

    } 
    
    public static boolean isPal(String s){
        for(int i=0, j=s.length()-1;i<=j;i++,j--){
                if(s.charAt(i)!=s.charAt(j)) return false;
        }
        return true;
    }
    
    public static String rev(String s){
		StringBuilder sb=new StringBuilder(s);
		sb.reverse();
		return sb.toString();
    }
    
    public static long gcd(long x,long y){
	if(x%y==0)
		return y;
	else
		return gcd(y,x%y);
    }
    
    public static int gcd(int x,int y){
	if(x%y==0)
		return y;
	else 
		return gcd(y,x%y);
    }
    
    public static long gcdExtended(long a,long b,long[] x){
        
        if(a==0){
            x[0]=0;
            x[1]=1;
            return b;
        }
        long[] y=new long[2];
        long gcd=gcdExtended(b%a, a, y);
        
        x[0]=y[1]-(b/a)*y[0];
        x[1]=y[0];
        
        return gcd;
    }
    
    public static int abs(int a,int b){
	return (int)Math.abs(a-b);
    }

    public static long abs(long a,long b){
	return (long)Math.abs(a-b);
    }
    
    public static int max(int a,int b){
	if(a>b)
		return a;
	else
		return b;
    }

    public static int min(int a,int b){
	if(a>b)
		return b;
	else 
		return a;
    }
    
    public static long max(long a,long b){
	if(a>b)
		return a;
	else
		return b;
    }

    public static long min(long a,long b){
	if(a>b)
		return b;
	else 
		return a;
    }

    public static long pow(long n,long p,long m){
	 long  result = 1;
	  if(p==0)
	    return 1;
	if (p==1)
	    return n;
	while(p!=0)
	{
	    if(p%2==1)
	        result *= n;
	    if(result>=m)
	    result%=m;
	    p >>=1;
	    n*=n;
	    if(n>=m)
	    n%=m;
	}
	return result;
    }
    
    public static long pow(long n,long p){
	long  result = 1;
	  if(p==0)
	    return 1;
	if (p==1)
	    return n;
	while(p!=0)
	{
	    if(p%2==1)
	        result *= n;	    
	    p >>=1;
	    n*=n;	    
	}
	return result;
    }
    public static void debug(Object... o) {
		System.out.println(Arrays.deepToString(o));
	}
	static 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);
		}
	}
}    

