#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n;
  int k;
  cin >> n >> k;
  int temp;
  std::vector<pair<int, int> > v;
  std::vector<pair<int, int> > ans;
  for (int i = 0; i < n; ++i) {
    cin >> temp;
    v.push_back(pair<int, int>(temp, i + 1));
  }
  for (int i = 1; i <= k; i++) {
    sort(v.begin(), v.end());
    if (v[n - 1].first == v[0].first) break;
    ans.push_back(pair<int, int>(v[n - 1].second, v[0].second));
    v[n - 1].first--;
    v[0].first++;
  }
  sort(v.begin(), v.end());
  cout << v[n - 1].first - v[0].first << " " << ans.size() << endl;
  for (auto x : ans) cout << x.first << " " << x.second << endl;
  return 0;
}
