#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("-ffloat-store")
using namespace std;
const long long mod = 998244353;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t;
  t = 1;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> a;
    for (long long i = 0; i < n; i++) {
      long long x;
      cin >> x;
      a.emplace_back(x);
    }
    long long op = 0;
    vector<pair<long long, long long> > v;
    while (k--) {
      long long mx = *max_element(a.begin(), a.end()),
                mi = *min_element(a.begin(), a.end());
      if (abs(mx - mi) < 2) {
        break;
      }
      long long in_mx = max_element(a.begin(), a.end()) - a.begin();
      long long in_mi = min_element(a.begin(), a.end()) - a.begin();
      v.push_back({in_mx + 1, in_mi + 1});
      a[in_mx]--, a[in_mi]++;
      op++;
    }
    cout << *max_element(a.begin(), a.end()) - *min_element(a.begin(), a.end())
         << " " << op << "\n";
    for (long long i = 0; i < op; i++) {
      cout << v[i].first << " " << v[i].second << "\n";
    }
  }
  return 0;
}
