#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long unsigned int n, k;
  cin >> n >> k;
  vector<long long unsigned int> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<pair<long long unsigned int, long long unsigned int>> res;
  for (int i = 0; i < k; i++) {
    vector<long long unsigned int>::iterator it1 =
        max_element(a.begin(), a.end());
    vector<long long unsigned int>::iterator it2 =
        min_element(a.begin(), a.end());
    if (it1 == it2 || *it1 == *it2 + 1) break;
    (*it1) -= 1;
    (*it2) += 1;
    res.push_back(make_pair(it1 - a.begin() + 1, it2 - a.begin() + 1));
  }
  cout << *max_element(a.begin(), a.end()) - *min_element(a.begin(), a.end())
       << ' ';
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++)
    cout << res[i].first << " " << res[i].second << endl;
  return 0;
}
