#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  vector<int> v(n + 1);
  for (int i = 1; i <= n; i++) cin >> v[i];
  vector<pair<long long, long long> > pairs;
  for (int i = 0; i < k; i++) {
    int maxi = -1;
    int mini = 100000;
    int p1 = 0;
    int p2 = 0;
    for (int j = 1; j <= n; j++) {
      if (v[j] > maxi) {
        maxi = v[j];
        p1 = j;
      }
      if (v[j] < mini) {
        mini = v[j];
        p2 = j;
      }
    }
    if (abs(maxi - mini) <= 1) break;
    v[p1]--;
    v[p2]++;
    pairs.push_back(pair<long long, long long>(p1, p2));
  }
  int maxi = -1;
  int mini = 100000;
  for (int i = 1; i <= n; i++) {
    maxi = max(maxi, v[i]);
    mini = min(mini, v[i]);
  }
  cout << maxi - mini << " " << pairs.size() << '\n';
  for (int i = 0; i < pairs.size(); i++)
    cout << pairs[i].first << " " << pairs[i].second << '\n';
  return 0;
}
