#include <bits/stdc++.h>
using namespace std;
const int MAXN = 4e5 + 5;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
int a[MAXN];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int cnt = 0, ans = inf, id = 0, tmp;
  for (int i = 1; i <= n; i++) {
    cnt = 0;
    tmp = a[i] - (i - 1) * k;
    if (tmp <= 0) continue;
    for (int j = 1; j <= n; j++) {
      if (a[j] != tmp) cnt++;
      tmp += k;
    }
    if (ans > cnt) {
      ans = cnt;
      id = i;
    }
  }
  printf("%d\n", ans);
  tmp = a[id] - (id - 1) * k;
  for (int i = 1; i <= n; i++) {
    if (a[i] > tmp) printf("- %d %d\n", i, a[i] - tmp);
    if (a[i] < tmp) printf("+ %d %d\n", i, tmp - a[i]);
    tmp += k;
  }
  return 0;
}
