#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, aux;
  scanf("%d %d", &n, &k);
  pair<int, int> p[n], x[k];
  aux = n - 1;
  for (i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i;
  }
  for (i = 0; i < k; i++) {
    sort(p, p + n);
    if ((p[aux].first - p[0].first) <= 1) break;
    x[i].first = p[aux].second;
    x[i].second = p[0].second;
    p[0].first++;
    p[aux].first--;
  }
  sort(p, p + n);
  cout << p[n - 1].first - p[0].first << " " << i << endl;
  for (int j = 0; j < i; j++) {
    cout << x[j].first + 1 << " " << x[j].second + 1 << endl;
  }
  return 0;
}
