#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(vector<T> &A) {
  for_each(A.begin(), A.end(), [&](T &i) { cin >> i; });
}
template <typename T>
inline void print(const vector<T> &A, const string &sep = " ",
                  const string &delim = "\n") {
  for_each(A.begin(), A.end(), [&](const T &i) { cout << i << sep; });
  cout << delim;
}
const size_t MOD = 1e9 + 7;
const size_t MAXA = 1e9;
const size_t MAXN = 2 * 1e5 + 1;
long long N, K, S = INT_MAX;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> N >> K;
  vector<int> A(N);
  vector<pair<int, int> > answer;
  read(A);
  for (int i = 0; i < K; i++) {
    int max_val = 0, max_idx = -1;
    int min_val = INT_MAX, min_idx = -1;
    for (int j = 0; j < N; j++) {
      if (A[j] > max_val) {
        max_val = A[j];
        max_idx = j;
      }
      if (A[j] < min_val) {
        min_val = A[j];
        min_idx = j;
      }
    }
    if (min_val == max_val || (min_val + 1) == max_val) break;
    A[max_idx]--, A[min_idx]++;
    answer.push_back({max_idx + 1, min_idx + 1});
  }
  S = *max_element((A).begin(), (A).end()) -
      *min_element((A).begin(), (A).end());
  cout << S << " " << answer.size() << '\n';
  for (const auto [u, v] : answer) cout << u << " " << v << '\n';
  return 0;
}
