The Queen of England has n trees growing in a row in her garden. At that, the i-th (1 ≤ i ≤ n) tree from the left has height ai meters. Today the Queen decided to update the scenery of her garden. She wants the trees' heights to meet the condition: for all i (1 ≤ i < n), ai + 1 - ai = k, where k is the number the Queen chose.

Unfortunately, the royal gardener is not a machine and he cannot fulfill the desire of the Queen instantly! In one minute, the gardener can either decrease the height of a tree to any positive integer height or increase the height of a tree to any positive integer height. How should the royal gardener act to fulfill a whim of Her Majesty in the minimum number of minutes?

Input

The first line contains two space-separated integers: n, k (1 ≤ n, k ≤ 1000). The second line contains n space-separated integers a1, a2, ..., an (1 ≤ ai ≤ 1000) — the heights of the trees in the row. 

Output

In the first line print a single integer p — the minimum number of minutes the gardener needs. In the next p lines print the description of his actions. 

If the gardener needs to increase the height of the j-th (1 ≤ j ≤ n) tree from the left by x (x ≥ 1) meters, then print in the corresponding line "+ j x". If the gardener needs to decrease the height of the j-th (1 ≤ j ≤ n) tree from the left by x (x ≥ 1) meters, print on the corresponding line "- j x".

If there are multiple ways to make a row of trees beautiful in the minimum number of actions, you are allowed to print any of them.

Examples

Input

4 1
1 2 1 5


Output

2
+ 3 2
- 4 1


Input

4 1
1 2 3 4


Output

0
import java.util.*;
import java.awt.Point;
import java.io.*;
import java.math.BigInteger;

public class B1 
{
    FastScanner in;
    PrintWriter out;

    public void solve() throws IOException 
    {
        int n = in.nextInt();
        int k = in.nextInt();
        
        int mas[] = in.nextIntArray(n);
        
        if(n == 1)
            out.print(0);
        else
        {
            HashSet<Integer> hs = new HashSet<Integer>();
            
            for(int i = 0; i < n; i++)
            {
                hs.add(i);
            }
            
            HashSet<Integer> hsBest = new HashSet<Integer>();
            int indexBestFirst = 0;
            for(int i = 0; i < n; i++)
            {
                if(hs.contains(i))
                {
                    hs.remove(i);
                    
                    if(mas[i] - k * i > 0)
                    {
                        HashSet<Integer> hsCur = new HashSet<Integer>();
                        hsCur.add(i);                       
                        
                        for(int j = i + 1, m = 1; j < n; j++, m++)
                        {
                            if(mas[j] == mas[i] + k * m)
                            {
                                hs.remove(j);
                                hsCur.add(j);
                            }
                        }
                        
                        if(hsCur.size() > hsBest.size())
                        {
                            hsBest         = hsCur;
                            indexBestFirst = i;
                        }
                    }
                }
            }
            
            int kolOper = n - hsBest.size();
            out.println(kolOper);
            
            if(kolOper != 0)
            {
                int startFrom = mas[indexBestFirst] - indexBestFirst * k;
                
                for(int i = 0; i < n; i++)
                {
                    if(hsBest.contains(i) == false)
                    {
                        int good   = startFrom + i * k;                     
                        int change = mas[i] - good;
                        
                        if(change > 0)
                            out.print("- ");
                        else
                            out.print("+ ");
                        
                        out.print(i + 1);
                        out.print(" ");
                        out.println(Math.abs(change));
                        
                        
                    }
                }
            }
            
            
        }
            
        
        
    }

    public void run() {
        try {
            //in  = new FastScanner(new File("sum.in"));
            //out = new PrintWriter(new File("sum.out"));
            
            in  = new FastScanner();
            out = new PrintWriter(System.out);

            solve();

            out.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    class FastScanner {
        BufferedReader br;
        StringTokenizer st;
        
        FastScanner() {
            
            br = new BufferedReader(new InputStreamReader(System.in));
        
        }

        FastScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
        }

        String next() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() 
        {
            return Integer.parseInt(next());
        }
        
        long nextLong() 
        {
            return Long.parseLong(next());
        }
        
        double nextDouble() 
        {
            return Double.parseDouble(next());
        }
        
        int[] nextIntArray(int size) 
        {
            int[] array = new int[size];
            
            for (int i = 0; i < size; i++){
                array[i] = nextInt();
            }
            
            return array;
        }
        
        long[] nextLongArray(int size) 
        {
            long[] array = new long[size];
            
            for (int i = 0; i < size; i++){
                array[i] = nextLong();
            }
            
            return array;
        }
        
        BigInteger nextBigInteger() 
        {
            return new BigInteger(next());
        }
        
        Point nextIntPoint()
        {
            int x = nextInt();
            int y = nextInt();
            return new Point(x, y);
        }
        
        Point[] nextIntPointArray(int size)
        {
            Point[] array = new Point[size];
            
            for (int index = 0; index < size; ++index){
                array[index] = nextIntPoint();
            }
            
            return array;
        }
        
        List<Integer>[] readGraph(int vertexNumber, int edgeNumber, boolean undirected)
        {
            List<Integer>[] graph = new List[vertexNumber];
                    
            for (int index = 0; index < vertexNumber; ++index)
            {
                graph[index] = new ArrayList<Integer>();
            }
                    
            while (edgeNumber-- > 0)
            {
                int from = nextInt() - 1;
                int to   = nextInt() - 1;
                        
                graph[from].add(to);
                if(undirected)
                    graph[to].add(from);
            }
                    
            return graph;
        }
    }

    public static void main(String[] arg) 
    {
        new B1().run();
    }
}