#include <bits/stdc++.h>
using namespace std;
int dp[100][100];
struct point {
 public:
  int f, t;
  point() {}
  point(int a, int b) { f = a, t = b; }
};
int main() {
  int X, k;
  cin >> X >> k;
  int val, sum = 0;
  vector<pair<int, int>> a, b;
  for (int i = 0; i < (X); i++) {
    cin >> val;
    sum += val;
    a.push_back(make_pair(val, i + 1));
  }
  sort((a).begin(), (a).end());
  int cnt = 0;
  while (k--) {
    int di = a[X - 1].first - a[0].first;
    if (di > 1) {
      a[X - 1].first--;
      a[0].first++;
      b.push_back(make_pair(a[X - 1].second, a[0].second));
      sort((a).begin(), (a).end());
      cnt++;
    } else
      break;
  }
  cout << a[X - 1].first - a[0].first << " " << cnt << endl;
  for (int j = 0; j < (cnt); j++)
    cout << b[j].first << " " << b[j].second << endl;
  return 0;
}
