#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  scanf("%d %d", &N, &K);
  int a[N];
  for (int i = 0; i < N; i++) scanf("%d", &a[i]);
  int arr[N], pos[N];
  int cnt = 99999;
  for (int i = 0; i < N; i++) {
    int t_arr[N], t_pos[N];
    int ptr = 0;
    bool neg = false;
    for (int j = 0; j < N; j++) {
      if (i == j) continue;
      int t_val = a[i] + ((j - i) * K) - a[j];
      if (t_val != 0) {
        t_arr[ptr] = t_val;
        t_pos[ptr] = (j + 1);
        ptr++;
        if ((t_val + a[j]) <= 0) neg = true;
      }
    }
    if (!neg && ptr < cnt) {
      cnt = ptr;
      for (int j = 0; j < cnt; j++) {
        arr[j] = t_arr[j];
        pos[j] = t_pos[j];
      }
    }
  }
  printf("%d\n", cnt);
  for (int i = 0; i < cnt; i++) {
    if (arr[i] < 0)
      printf("%c %d %d\n", '-', pos[i], -arr[i]);
    else
      printf("%c %d %d\n", '+', pos[i], arr[i]);
  }
  return 0;
}
