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.*;
public class MainClass
{
    public static void main(String[] args) throws IOException
    {
        Reader in = new Reader();
        int n = in.nextInt();
        long d = in.nextLong();
        long[] A = new long[n];
        for (int i=0;i<n;i++)  A[i] = in.nextLong();
        int[] C = new int[n];
        Game[] B = new Game[n];
        for (int i=0;i<n;i++)
            B[i] = new Game(A[i], i);
        Arrays.sort(B);
        long[] D = new long[n];
        for (int i=0;i<n;i++)
        {
            D[i] = B[i].val;
            C[B[i].idx] = i + 1;
        }
        BinarySearchForArrays binarySearchForArrays = new BinarySearchForArrays();
        BIT1 BIT1 = new BIT1(n + 10);
        BIT2 BIT2 = new BIT2(n + 10);
        int[] dp = new int[n];
        int[] cache = new int[n];
        Arrays.fill(cache, -1);
        for (int i=n - 1;i>=0;i--)
        {
            long x = A[i] + d;
            dp[C[i] - 1] = 1;
            int idx = binarySearchForArrays.first(D, 0, n - 1, x, n);
            if (idx == -1)
                idx = -Arrays.binarySearch(D, x);
            else
                idx++;
            int sum = BIT2.sum(idx);
            if (sum >= 1 && sum <= n)
            {
                dp[C[i] - 1] = dp[sum - 1] + 1;
                cache[C[i] - 1] = sum - 1;
            }
            x = A[i] - d;
            idx = binarySearchForArrays.last(D, 0, n - 1, x, n);
            if (idx == -1)
                idx = -Arrays.binarySearch(D, x) - 1;
            else
                idx++;
            sum = BIT1.sum(idx);
            if (sum >= 1 && sum <= n && dp[sum - 1] + 1 > dp[C[i] - 1])
            {
                dp[C[i] - 1] = dp[sum - 1] + 1;
                cache[C[i] - 1] = sum - 1;
            }
            BIT1.update(C[i], dp[C[i] - 1], C[i]);
            BIT2.update(C[i], dp[C[i] - 1], C[i]);
        }
        StringBuilder stringBuilder = new StringBuilder();
        int ans = 1;
        int pos = 0;
        for (int i=0;i<n;i++)
        {
            if (dp[i] > ans)
            {
                ans = dp[i];
                pos = i;
            }
        }
        stringBuilder.append(ans).append("\n");
        int start = pos;
        int count = 0;
        while (count < ans)
        {
            stringBuilder.append(B[start].idx + 1).append(" ");
            start = cache[start];
            count++;
        }
        System.out.println(stringBuilder);
    }
}
class Game implements Comparable<Game>
{
    long val;
    int idx;

    public Game(long val, int idx)
    {
        this.val = val;
        this.idx = idx;
    }

    @Override
    public int compareTo(Game ob)
    {
        if (this.val < ob.val)
            return -1;
        else if (this.val > ob.val)
            return 1;
        return 0;
    }
}
class BIT1
{
    int size;
    int[] table;
    int[] pos;
    public BIT1(int size)
    {
        table = new int[size];
        pos = new int[size];
        Arrays.fill(table, Integer.MIN_VALUE);
        Arrays.fill(pos, -1);
        this.size = size;
    }

    void update(int i, int delta, int pos)
    {
        while (i < size)
        {
            if (delta > table[i])
            {
                table[i] = delta;
                this.pos[i] = pos;
            }
            i += Integer.lowestOneBit(i);
        }
    }

    int sum(int i)
    {
        int sum = Integer.MIN_VALUE;
        int pos = -1;
        while (i > 0)
        {
            if (table[i] > sum)
            {
                sum = table[i];
                pos = this.pos[i];
            }
            i -= Integer.lowestOneBit(i);
        }
        return pos;
    }
}
class BIT2
{
    int size;
    int[] table;
    int[] pos;
    public BIT2(int size)
    {
        table = new int[size];
        pos = new int[size];
        Arrays.fill(table, Integer.MIN_VALUE);
        Arrays.fill(pos, -1);
        this.size = size;
    }

    void update(int i, int delta, int pos)
    {
        while (i > 0)
        {
            if (delta > table[i])
            {
                table[i] = delta;
                this.pos[i] = pos;
            }
            i -= Integer.lowestOneBit(i);
        }
    }

    int sum(int i)
    {
        int sum = Integer.MIN_VALUE;
        int pos = -1;
        while (i < size)
        {
            if (table[i] > sum)
            {
                sum = table[i];
                pos = this.pos[i];
            }
            i += Integer.lowestOneBit(i);
        }
        return pos;
    }
}
class Reader
{
    final private int BUFFER_SIZE = 1 << 16;
    private DataInputStream din;
    private byte[] buffer;
    private int bufferPointer, bytesRead;

    public Reader()
    {
        din = new DataInputStream(System.in);
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public Reader(String file_name) throws IOException
    {
        din = new DataInputStream(new FileInputStream(file_name));
        buffer = new byte[BUFFER_SIZE];
        bufferPointer = bytesRead = 0;
    }

    public String readLine() throws IOException
    {
        byte[] buf = new byte[64]; // line length
        int cnt = 0, c;
        while ((c = read()) != -1)
        {
            if (c == '\n')
                break;
            buf[cnt++] = (byte) c;
        }
        return new String(buf, 0, cnt);
    }

    public int nextInt() throws IOException
    {
        int ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do
        {
            ret = ret * 10 + c - '0';
        }  while ((c = read()) >= '0' && c <= '9');

        if (neg)
            return -ret;
        return ret;
    }

    public long nextLong() throws IOException
    {
        long ret = 0;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();
        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');
        if (neg)
            return -ret;
        return ret;
    }

    public double nextDouble() throws IOException
    {
        double ret = 0, div = 1;
        byte c = read();
        while (c <= ' ')
            c = read();
        boolean neg = (c == '-');
        if (neg)
            c = read();

        do {
            ret = ret * 10 + c - '0';
        }
        while ((c = read()) >= '0' && c <= '9');

        if (c == '.')
        {
            while ((c = read()) >= '0' && c <= '9')
            {
                ret += (c - '0') / (div *= 10);
            }
        }

        if (neg)
            return -ret;
        return ret;
    }

    private void fillBuffer() throws IOException
    {
        bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
        if (bytesRead == -1)
            buffer[0] = -1;
    }

    private byte read() throws IOException
    {
        if (bufferPointer == bytesRead)
            fillBuffer();
        return buffer[bufferPointer++];
    }

    public void close() throws IOException
    {
        if (din == null)
            return;
        din.close();
    }
}
class BinarySearchForArrays
{
    public int first(int arr[], int low, int high, int x, int n)
    {
        if(high >= low)
        {
            int mid = low + (high - low)/2;
            if( ( mid == 0 || x > arr[mid-1]) && arr[mid] == x)
                return mid;
            else if(x > arr[mid])
                return first(arr, (mid + 1), high, x, n);
            else
                return first(arr, low, (mid -1), x, n);
        }
        return -1;
    }

    public  int last(int arr[], int low, int high, int x, int n)
    {
        if (high >= low)
        {
            int mid = low + (high - low)/2;
            if (( mid == n-1 || x < arr[mid+1]) && arr[mid] == x)
                return mid;
            else if (x < arr[mid])
                return last(arr, low, (mid -1), x, n);
            else
                return last(arr, (mid + 1), high, x, n);
        }
        return -1;
    }

    public int first(long arr[], int low, int high, long x, int n)
    {
        if(high >= low)
        {
            int mid = low + (high - low)/2;
            if( ( mid == 0 || x > arr[mid-1]) && arr[mid] == x)
                return mid;
            else if(x > arr[mid])
                return first(arr, (mid + 1), high, x, n);
            else
                return first(arr, low, (mid -1), x, n);
        }
        return -1;
    }

    public int last(long arr[], int low, int high, long x, int n)
    {
        if (high >= low)
        {
            int mid = low + (high - low)/2;
            if (( mid == n-1 || x < arr[mid+1]) && arr[mid] == x)
                return mid;
            else if (x < arr[mid])
                return last(arr, low, (mid -1), x, n);
            else
                return last(arr, (mid + 1), high, x, n);
        }
        return -1;
    }
}
