#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[1001];
vector<pair<int, int> > result;
int main(int argc, char const* argv[]) {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].first);
    a[i].second = i + 1;
  }
  sort(a, a + n);
  while (k-- && a[0].first < a[n - 1].first - 1) {
    result.push_back(make_pair(a[n - 1].second, a[0].second));
    --a[n - 1].first, ++a[0].first;
    sort(a, a + n);
  }
  printf("%d %d\n", a[n - 1].first - a[0].first, result.size());
  for (int i = 0; i < result.size(); ++i)
    printf("%d %d\n", result[i].first, result[i].second);
  return 0;
}
