#include <bits/stdc++.h>
using namespace std;
pair<int, int> perform(vector<int> &A) {
  int mn = *min_element(A.begin(), A.end()),
      mx = *max_element(A.begin(), A.end());
  if (mn != mx) {
    bool mn1 = 0, mx1 = 0;
    int idx1 = 0, idx2 = 0;
    for (int i = 0; i < A.size(); i++) {
      if (A[i] == mn && !mn1) {
        mn1 = 1;
        A[i]++;
        idx1 = i + 1;
      }
      if (A[i] == mx && !mx1) {
        mx1 = 1;
        A[i]--;
        idx2 = i + 1;
      }
    }
    return make_pair(idx1, idx2);
  }
  return make_pair(-1, -1);
}
int main() {
  int n, k, idx1 = -1, idx2 = -1;
  scanf("%d%d", &n, &k);
  vector<int> A(n);
  for (int i = 0; i < n; i++) scanf("%d", &A[i]);
  vector<pair<int, int> > Ans;
  do {
    pair<int, int> B = perform(A);
    idx1 = B.first, idx2 = B.second;
    if (idx1 != idx2) Ans.push_back(B);
    k--;
  } while (idx1 != -1 && idx2 != -1 && k);
  int mn = *min_element(A.begin(), A.end()),
      mx = *max_element(A.begin(), A.end());
  printf("%d %d\n", mx - mn, Ans.size());
  for (int i = 0; i < Ans.size(); i++)
    printf("%d %d\n", Ans[i].second, Ans[i].first);
}
