#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
long long max(long long a, long long b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  int k, n;
  cin >> n >> k;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a[i] = pair<int, int>(x, i);
  }
  sort(a.begin(), a.end());
  vector<pair<int, int> > ans;
  for (;;) {
    if (a[0].first == a[n - 1].first)
      break;
    else {
      int f = 0;
      while (a[0].first < a[n - 1].first && a[n - 1].first - a[0].first >= 2 &&
             k > 0) {
        f = 1;
        k--;
        a[n - 1].first--, a[0].first++;
        ans.push_back(pair<int, int>(a[n - 1].second, a[0].second));
        sort(a.begin(), a.end());
      }
      if (f == 0 || k == 0) break;
      sort(a.begin(), a.end());
    }
  }
  sort(a.begin(), a.end());
  cout << a[a.size() - 1].first - a[0].first << " " << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first + 1 << " " << ans[i].second + 1 << endl;
  return 0;
}
