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 __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long double PI = acos(-1.0);
long long int power(long long int x, long long int y) {
  long long int res = 1;
  x = x;
  while (y > 0) {
    if (y & 1) res = (res * x);
    y = y >> 1;
    x = (x * x);
  }
  return res;
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool isPalindrome(string s) {
  string t = s;
  reverse(t.begin(), t.end());
  return s == t;
}
void solve() {
  long long int n, k;
  cin >> n >> k;
  vector<long long int> arr(n);
  for (int i = 0; i < n; i++) cin >> arr[i];
  long long int res = LLONG_MAX;
  vector<pair<long long int, long long int> > ans;
  long long int ok = -1, pos = -1;
  for (long long int i = 1; i <= 9999; i++) {
    vector<long long int> v = arr;
    long long int key = i, temp = 0;
    vector<pair<long long int, long long int> > te;
    long long int prev = v[0];
    v[0] = i;
    if (v[0] != prev) {
      te.push_back(make_pair(v[0] - prev, 1));
      temp++;
    }
    for (long long int j = 1; j < n; j++) {
      if (v[j] - v[j - 1] != k) {
        temp++;
        long long int prev = v[j];
        v[j] = v[j - 1] + k;
        te.push_back(make_pair(v[j] - prev, j + 1));
      }
    }
    if (res >= temp) {
      ok = v[i];
      pos = i;
      res = temp;
      ans = te;
    }
  }
  cout << res << "\n";
  ;
  ;
  for (int i = 0; i < ans.size(); i++) {
    if (ans[i].first > 0)
      cout << "+ ";
    else
      cout << "- ";
    cout << ans[i].second << " " << abs(ans[i].first) << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
