#include <bits/stdc++.h>
using namespace std;
int n, k, a[1010];
vector<pair<char, pair<int, int> > > ans;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  ans.push_back({'#', {0, 0}});
  for (int i = 1; i <= n; i++) cin >> a[i], ans.push_back({'#', {0, 0}});
  for (int x = 1; x <= 3000; x++) {
    vector<pair<char, pair<int, int> > > tmp;
    if (a[1] != x) {
      char ch = '+';
      if (a[1] > x) ch = '-';
      tmp.push_back({ch, {1, abs(a[1] - x)}});
    }
    for (int i = 2; i <= n; i++) {
      char ch = '+';
      int y = x + (i - 1) * k;
      if (a[i] == y) continue;
      if (a[i] > y) ch = '-';
      tmp.push_back({ch, {i, abs(a[i] - y)}});
    }
    if (tmp.size() < ans.size()) ans = tmp;
  }
  cout << ans.size() << endl;
  for (pair<char, pair<int, int> > x : ans)
    cout << x.first << " " << x.second.first << " " << x.second.second << endl;
  return 0;
}
