#include <bits/stdc++.h>
using namespace std;
long long int a[1003], n, k, r[1003], mn = 999999999999, pos = 0, mo = 0,
                                      da = 0;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) r[i] = a[i] - (1 + i * k);
  for (int i = 0; i < n; i++) {
    mo = 0;
    for (int j = 0; j < n; j++)
      if (r[i] != r[j] && a[j] + (r[i] - r[j]) > 0)
        mo++;
      else if (a[j] + (r[i] - r[j]) <= 0)
        mo = 99999999999999;
    if (mo < mn) mn = mo, pos = i;
  }
  cout << mn << "\n";
  for (int i = 0; i < n; i++) {
    mo = r[pos] - r[i];
    if (mo == 0)
      continue;
    else {
      if (mo < 0)
        cout << "- ";
      else
        cout << "+ ";
      cout << i + 1 << " " << max(mo, mo * (-1)) << "\n";
    }
  }
  return 0;
}
