#include <bits/stdc++.h>
using namespace std;
int a[1005];
int main() {
  int n, k, minl, cnt, add;
  while (~scanf("%d%d", &n, &k)) {
    for (int i = 0; i < n; i++) scanf("%d", a + i);
    minl = 1 << 29;
    ;
    for (int i = 1; i <= 10000; i++) {
      cnt = 0;
      int temp = i;
      for (int j = 0; j < n; j++) {
        if (temp != a[j]) cnt++;
        temp += k;
      }
      if (minl > cnt) {
        minl = cnt;
        add = i;
      }
    }
    printf("%d\n", minl);
    for (int i = 0; i < n; i++) {
      if (add > a[i]) printf("+ %d %d\n", i + 1, add - a[i]);
      if (add < a[i]) printf("- %d %d\n", i + 1, a[i] - add);
      add += k;
    }
  }
  return 0;
}
