#include <bits/stdc++.h>
using namespace std;
int fact(int n);
int nCr(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }
int fact(int n) {
  int res = 1;
  for (int i = 2; i <= n; i++) res = res * i;
  return res;
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0), cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<pair<int, int>> v;
    for (int i = 0; i < n; i++) {
      int x;
      cin >> x;
      v.push_back(make_pair(x, i + 1));
    }
    sort(v.begin(), v.end());
    int inmax = n - 1, inmin = 0;
    vector<pair<int, int>> v1;
    if (n == 1) {
      cout << "0"
           << " "
           << "0" << endl;
      return 0;
    }
    int x = 0;
    while (k--) {
      if (v[inmin].first == v[inmax].first) {
        break;
      }
      if (v[inmax].first >= v[(inmax - 1) % n].first) {
        if (v[inmin].first <= v[(inmin + 1) % n].first) {
          v[inmin].first = v[inmin].first + 1;
          v[inmax].first = v[inmax].first - 1;
          v1.push_back(make_pair(v[inmax].second, v[inmin].second));
        } else {
          v[(inmin + 1) % n].first = v[(inmin + 1) % n].first + 1;
          v[(inmax) % n].first = v[(inmax) % n].first - 1;
          inmin = (inmin + 1) % n;
          v1.push_back(make_pair(v[inmax].second, v[inmin].second));
        }
      } else {
        inmax = (inmax - 1) % n;
        if (v[inmin].first <= v[(inmin + 1) % n].first) {
          v[inmin].first = v[inmin].first + 1;
          v[inmax].first = v[inmax].first - 1;
          v1.push_back(make_pair(v[inmax].second, v[inmin].second));
        } else {
          v[(inmin + 1) % n].first = v[(inmin + 1) % n].first + 1;
          v[(inmax) % n].first = v[(inmax) % n].first - 1;
          inmin = (inmin + 1) % n;
          v1.push_back(make_pair(v[inmax].second, v[inmin].second));
        }
      }
      x++;
      sort(v.begin(), v.end());
    }
    sort(v.begin(), v.end());
    int s = v[n - 1].first - v[0].first;
    cout << s << " " << x << endl;
    for (int i = 0; i < x; i++) {
      cout << v1[i].first << " " << v1[i].second << endl;
    }
  }
}
