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.util.regex.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.lang.Integer.*;
import static java.lang.Double.*;
import static java.util.Collections.*;
import java.io.*;

public class _402_B_Trees_in_a_Row {
	//->solution screencast http://youtu.be/oHg5SJYRHA0
	public void solve() {
		int n = ni(), k=ni();
		int [] ar= na(n);
		int min = 1<<30;
		ArrayList<String> RES = new ArrayList<String>();
		for (int i = 0; i < ar.length; i++) {
			ArrayList<String> res = new ArrayList<String>();
//			pr("");
			if(ar[i]-i*k<1)
				continue;
			for (int j = 0; j < ar.length; j++) {
				if(i==j)continue;
				
				int should=0; 
				if(j>i){
					should=ar[i]+k*(j-i);
				}else{
					should=ar[i]-k*(i-j);
				}
//				pr(i,j,should); 
				if(should!=ar[j]){
					if(should>ar[j]){
						String r = "+ "+(j+1)+" "+(should-ar[j]);
						res.add(r);
//						out.println();
					}else{
						String r = "- "+(j+1)+" "+(ar[j]-should);
						res.add(r);
					}
				}
				
			}
			if(res.size()<min){
				min=res.size();
				RES=res;
			}
//			pr(res);
		}
		out.println(RES.size());
		for (String string : RES) {
			out.println(string);
		}
		if(true)
			return;
		
		int m=0;
		int start=0;
		
		
		int maxstart=0;
		int maxend=0;
		int i=1;
		for ( i = 1; i < ar.length; i++) {
			if(ar[i]-k==ar[i-1]){
//				m++;
			}else{
				if(i-start>m && ar[start]-start>=0){
					m=i-start;
					maxstart=start;
					maxend=i-1;
				}
				start=i;
			}
		}
		if(i-start>m && ar[start]-start>0){
			m=i-start;
			maxstart=start;
			maxend=i-1;
		}
		
		pr(m,maxstart,maxend);
		ArrayList<String> res = new ArrayList<String>();
		
		for (int j = 0; j < ar.length; j++) {
			if(j>=maxstart && j<=maxend)
				continue;
			int should=0;
			if(j>maxend){
				should=ar[maxend]+k*(j-maxend);
			}else if(j<maxstart){
				should=ar[maxstart]-k*(maxstart-j);
			}
			pr(should);
			if(should!=ar[j]){
				if(should>ar[j]){
					String r = "+ "+(j+1)+" "+(should-ar[j]);
					res.add(r);
//					out.println();
				}else{
					String r = "- "+(j+1)+" "+(ar[j]-should);
					res.add(r);
				}
			}else{
			}
		}
		out.println(res.size());
		for (String string : res) {
			out.println(string);
		}
		
	}
	
	
	
	// IO methods
		
	void run() throws Exception {
		long s = System.currentTimeMillis();
		solve();
		out.flush();
		pr(System.currentTimeMillis() - s + "ms");
	}
	public static void main(String[] args) throws Exception {new _402_B_Trees_in_a_Row().run();}

	InputStream in=System.in;
	PrintWriter out=new PrintWriter(System.out);
	
	private boolean oj = System.getProperty("ONLINE_JUDGE") != null;
	private byte[] inbuf = new byte[1024];
	private int lenbuf = 0, ptrbuf = 0;

	private int readByte() {
		if (lenbuf == -1)
			throw new InputMismatchException();
		if (ptrbuf >= lenbuf) {
			ptrbuf = 0;
			try {
				lenbuf = in.read(inbuf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (lenbuf <= 0)
				return -1;
		}
		return inbuf[ptrbuf++];
	}

	private boolean isSpaceChar(int c) {return !(c >= 33 && c <= 126);}
	private int skip() {int b;while ((b = readByte()) != -1 && isSpaceChar(b));return b;}

	public String ns() {
		int b = skip();
		StringBuilder sb = new StringBuilder();
		while (!(isSpaceChar(b))) { // when nextLine, (isSpaceChar(b) && b != // ' ')
			sb.appendCodePoint(b);
			b = readByte();
		}
		return sb.toString();
	}
	
	public char[] ns(int n)
	{
		char[] buf = new char[n];
		int b = skip(), p = 0;
		while(p < n && !(isSpaceChar(b))){
			buf[p++] = (char)b;
			b = readByte();
		}
		return n == p ? buf : Arrays.copyOf(buf, p);
	}
	
	public char[][] nm(int n, int m)
	{
		char[][] map = new char[n][];
		for(int i = 0;i < n;i++)map[i] = ns(m);
		return map;
	}
	
	public int[] na(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++)
			a[i] = ni();
		return a;
	}
	
	
	public int ni() {
		int num = 0, b;
		boolean minus = false;
		while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))
			;
		if (b == '-') {
			minus = true;
			b = readByte();
		}

		while (true) {
			if (b >= '0' && b <= '9') {
				num = num * 10 + (b - '0');
			} else {
				return minus ? -num : num;
			}
			b = readByte();
		}
	}
	
	public long nl(){
		long num = 0;
		int b;
		boolean minus = false;
		while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
		if(b == '-'){
			minus = true;
			b = readByte();
		}
		while(true){
			if(b >= '0' && b <= '9'){
				num = num * 10 + (b - '0');
			}else{
				return minus ? -num : num;
			}
			b = readByte();
		}
	}

	void pr(Object... ob) {if (!oj)System.out.println(Arrays.deepToString(ob).replace("],", "],\n"));}
}

