#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[1100];
struct node {
  string op;
  int pos;
  int del;
};
vector<node> tout, out;
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int minc = 0x1fffffff;
  for (int i = 1; i <= n; i++) {
    if (a[i] - (i - 1) * k <= 0) continue;
    tout.clear();
    int tp = i;
    for (int j = 1; j <= n; j++) {
      if (a[tp] + k * (j - tp) != a[j]) {
        node tmp;
        tmp.del = a[j] - (a[tp] + k * (j - tp));
        tmp.pos = j;
        tmp.op = tmp.del < 0 ? "+" : "-";
        tout.push_back(tmp);
      }
    }
    if (minc > tout.size()) {
      minc = tout.size();
      out = tout;
    }
  }
  cout << out.size() << endl;
  for (int i = 0; i < out.size(); i++) {
    cout << out[i].op << ' ' << out[i].pos << ' ' << abs(out[i].del) << endl;
  }
  return 0;
}
