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
#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << endl;
  err(++it, args...);
}
long long int power(long long int a, long long int b,
                    long long int m = 1000000007) {
  long long int ans = 1;
  a = a % m;
  while (b > 0) {
    if (b & 1) ans = (1LL * a * ans) % m;
    b >>= 1;
    a = (1LL * a * a) % m;
  }
  return ans;
}
long long int ncr(long long int n, long long int r) {
  long long int res = 1;
  if (r > n - r) r = n - r;
  for (long long int i = 0; i < r; i++) {
    res *= n - i;
    res /= i + 1;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long int lcm(long long int a, long long int b) {
  return (a * b) / gcd(a, b);
}
clock_t time_p = clock();
void rtime() {
  time_p = clock() - time_p;
  cerr << "******************\nTime taken : "
       << (long double)(time_p) / CLOCKS_PER_SEC << "\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int tt = 1;
  long long int ii = 0;
  while (tt-- && ++ii) {
    long long int n, k;
    cin >> n >> k;
    vector<long long int> a(n);
    for (long long int i = 0; i < n; i++) cin >> a[i];
    long long int index, mn = INT_MAX;
    for (long long int i = 0; i < n; i++) {
      long long int val = a[i] - k, cnt = 0;
      bool flag = true;
      for (long long int j = i - 1; j >= 0; j--) {
        if (val < 1) {
          flag = false;
          break;
        }
        if (a[j] != val) cnt++;
        val -= k;
      }
      val = a[i] + k;
      if (flag)
        for (long long int j = i + 1; j < n; j++) {
          if (val < 1) {
            flag = false;
            break;
          }
          if (a[j] != val) cnt++;
          val += k;
        }
      if (flag) {
        if (cnt < mn) {
          mn = cnt;
          index = i;
        }
      }
    }
    cout << mn << "\n";
    long long int val = a[index] - k;
    for (long long int i = index - 1; i >= 0; i--) {
      if (a[i] != val) {
        if (a[i] < val)
          cout << "+ " << i + 1 << " " << val - a[i] << "\n";
        else
          cout << "- " << i + 1 << " " << a[i] - val << "\n";
      }
      val -= k;
    }
    val = a[index] + k;
    for (long long int i = index + 1; i < n; i++) {
      if (a[i] != val) {
        if (a[i] < val)
          cout << "+ " << i + 1 << " " << val - a[i] << "\n";
        else
          cout << "- " << i + 1 << " " << a[i] - val << "\n";
      }
      val += k;
    }
  }
  rtime();
  return 0;
}
