#include <bits/stdc++.h>
using namespace std;
int a[1001];
int ans[1001];
int n, k;
int main() {
  while (cin >> n >> k) {
    memset(ans, 0, sizeof(ans));
    for (int i = 1; i <= n; i++) cin >> a[i];
    int max = 10000;
    for (int i = 1; i <= n; i++) {
      int s = 0;
      for (int t = 1; t <= n; t++) {
        if (a[i] - a[t] != k * (i - t)) s++;
      }
      if (s < max) {
        if (a[i] - k * (i - 1) <= 0) continue;
        for (int t = 1; t <= n; t++) {
          ans[t] = k * (t - i) - a[t] + a[i];
        }
        max = s;
      }
    }
    cout << max << endl;
    for (int i = 1; i <= n; i++) {
      if (ans[i] > 0) cout << "+ " << i << " " << ans[i] << endl;
      if (ans[i] < 0) cout << "- " << i << " " << -ans[i] << endl;
    }
  }
  return 0;
}
