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.io.*;
import java.util.*;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		int n = in.nextInt();
		int k = in.nextInt();
		int[] a = Fun.nextInts(in, n);
		int minStart = 0;
		int minChange = Integer.MAX_VALUE;
		for(int start = 1; start <= 1000; ++start) {
			int change = 0;
			for(int i = 0; i < n; ++i) {
				if(start + i * k != a[i]) {
					++change;
				}
			}
			if(change < minChange) {
				minChange = change;
				minStart = start;
			}
		}
		
		System.out.println(minChange);
		for(int i = 0; i < n; ++i) {
			int goal = minStart + i * k;
			if(a[i] < goal) {
				System.out.println("+ " + (i + 1) + " " + (goal - a[i]));
			} else if(a[i] > goal) {
				System.out.println("- " + (i + 1) + " " + (a[i] - goal));
			}
		}
	}

}

// ///////////////////////////////////////////////////////////
// ///////////////////////////////////////////////////////////

class Fun {
	
	public static long power(long n, long e) {
		long result = 1;
		for(long i = 0; i < e; ++i) {
			result *= n;
		}
		return result;
	}
	
	public static int[] nextInts(Scanner in, int count) {
		int[] result = new int[count];
		for (int i = 0; i < count; ++i) {
			result[i] = in.nextInt();
		}
		return result;
	}
	
	public static boolean isPrime(int n) {
		boolean result = true;
		for(int i = 2; i * i <= n; ++i) {
			if(n % i == 0) {
				result = false;
				break;
			}
		}
		return result;
	}

	public static long gcd(long a, long b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	public static int gcd(int a, int b) {
		if (b == 0)
			return a;
		return gcd(b, a % b);
	}

	public static long lcm(long a, long b) {
		return a / gcd(a, b) * b;
	}

	public static int[][] transpose(int[][] mat) {
		int r = mat.length;
		int c = mat[0].length;
		int[][] result = new int[c][r];
		for (int i = 0; i < c; ++i)
			for (int j = 0; j < r; ++j)
				result[i][j] = mat[j][i];
		return result;
	}

	public static String repeatString(String s, long count) {
		StringBuilder sb = new StringBuilder();
		for (long i = 0; i < count; ++i) {
			sb.append(s);
		}
		return sb.toString();
	}
}

class Treap<K extends Comparable<? super K>, V> {
	
	Treap() {
		nullNode = new TreapNode<K, V>();
		nullNode.left = nullNode.right = nullNode;
		nullNode.priority = Integer.MAX_VALUE;
		rootNode = nullNode;
	}
	
	public V put(K key, V value) {
		PutResult<K, V> putResult = putHelp(rootNode, key, value);
		rootNode = putResult.newNode;
		return putResult.originalValue;
	}
	
	public V get(K key) {
		TreapNode<K, V> currentNode = rootNode;
		while(currentNode != nullNode && currentNode.key.compareTo(key) != 0) {
			if(key.compareTo(currentNode.key) < 0) {
				currentNode = currentNode.left;
			} else {
				currentNode = currentNode.right;
			}
		}
		
		if(currentNode == nullNode) {
			return null;
		} else {
			return currentNode.value;
		}
	}
	
	public V remove(K key) {
		V result = get(key);
		if(result != null) {
			rootNode = removeHelp(rootNode, key);
		}
		return result;
	}
	
	public K select(int rank) {
		if(rank >= size() || rank < 0) {
			return null;
		}
		TreapNode<K, V> currentNode = rootNode;
		while(rank != currentNode.left.size) {
			if(rank < currentNode.left.size) {
				currentNode = currentNode.left;
			} else {
				rank -= currentNode.left.size + 1;
				currentNode = currentNode.right;
			}
		}
		
		return currentNode.key;
	}
	
	public int rank(K key) {
		if(rootNode == nullNode) {
			return -1;
		}
		int result = rootNode.left.size;
		TreapNode<K, V> currentNode = rootNode;
		while(currentNode != nullNode && currentNode.key.compareTo(key) != 0) {
			if(key.compareTo(currentNode.key) < 0) {
				result -= currentNode.left.right.size + 1;
				currentNode = currentNode.left;
			} else {
				result += currentNode.right.left.size + 1;
				currentNode = currentNode.right;
			}
		}
		
		if(currentNode == nullNode) {
			return -1;
		} else {
			return result;
		}
	}
	
	public void clear() {
		rootNode = nullNode;
	}
	
	public int size() {
		return rootNode.size;
	}
	
	private static class TreapNode<K, V> {
		public K key;
		public V value;
		public int size;
		public int priority;
		TreapNode<K, V> left, right;
	}
	
	private static class PutResult<K, V> {
		public TreapNode<K, V> newNode;
		public V originalValue;
	}
	
	private PutResult<K, V> putHelp(TreapNode<K, V> node, K key, V value) {
		if(node == nullNode) {
			PutResult<K, V> result = new PutResult<K, V>();
			result.newNode = new TreapNode<K, V>();
			result.newNode.key = key;
			result.newNode.value = value;
			result.newNode.size = 1;
			result.newNode.priority = randomPriority.nextInt(Integer.MAX_VALUE);
			result.newNode.left = result.newNode.right = nullNode;
			return result;
		} else if(key.compareTo(node.key) == 0) {
			PutResult<K, V> result = new PutResult<K, V>();
			result.originalValue = node.value;
			node.value = value;
			result.newNode = node;
			return result;
		} else if(key.compareTo(node.key) < 0) {
			PutResult<K, V> result = putHelp(node.left, key, value);
			node.left = result.newNode;
			if(result.originalValue == null) {
				++node.size;
				if(node.left.priority < node.priority) {
					node = rightRotate(node);
				}
			}
			result.newNode = node;
			return result;
		} else {
			PutResult<K, V> result = putHelp(node.right, key, value);
			node.right = result.newNode;
			if(result.originalValue == null) {
				++node.size;
				if(node.right.priority < node.priority) {
					node = leftRotate(node);
				}
			}
			result.newNode = node;
			return result;
		}
	}
	
	private TreapNode<K, V> removeHelp(TreapNode<K, V> node, K key) {
		if(key.compareTo(node.key) == 0) {
			node = removeHelp2(node);
		} else if(key.compareTo(node.key) < 0) {
			--node.size;
			node.left = removeHelp(node.left, key);
		} else {
			--node.size;
			node.right = removeHelp(node.right, key);
		}
		return node;
	}
	
	private TreapNode<K, V> removeHelp2(TreapNode<K, V> node) {
		if(node.left == nullNode && node.right == nullNode) {
			return nullNode;
		}
		
		if(node.left.priority < node.right.priority) {
			node = rightRotate(node);
			--node.size;
			node.right = removeHelp2(node.right);
		} else {
			node = leftRotate(node);
			--node.size;
			node.left = removeHelp2(node.left);
		}
		return node;
	}
	
	private TreapNode<K, V> leftRotate(TreapNode<K, V> node) {
		TreapNode<K, V> result = node.right;
		node.right = result.left;
		result.left = node;
		result.size = node.size;
		node.size -= 1 + result.right.size;
		return result;
	}
	
	private TreapNode<K, V> rightRotate(TreapNode<K, V> node) {
		TreapNode<K, V> result = node.left;
		node.left = result.right;
		result.right = node;
		result.size = node.size;
		node.size -= 1 + result.left.size;
		return result;
	}
	
	private TreapNode<K, V> nullNode;
	private TreapNode<K, V> rootNode;
	private Random randomPriority = new Random();
}