#include <bits/stdc++.h>
using namespace std;
int n, m;
int a[2020];
int b[2020];
int last;
int work(int bc) {
  int res = 0;
  last = a[0];
  b[0] = 0;
  int mi = 0, mx = 0;
  for (int i = 1; i < n; i++) {
    b[i] = last + bc - a[i];
    last = last + bc;
    mi = min(mi, b[i]);
    mx = max(mx, b[i]);
  }
  int tp = abs(mi - mx);
  res = tp / 2;
  if (tp & 1) res++;
  last = a[0] + res - mx;
  return res;
}
int main() {
  while (~scanf("%d", &n)) {
    for (int i = 0; i < n; i++) scanf("%d", &a[i]);
    sort(a, a + n);
    int l = 0, r = 20000;
    int mid;
    int ans = 30000;
    int t1, t2;
    for (int i = 0; i <= 20000; i++)
      if (work(i) < ans) {
        ans = work(i);
        t1 = last;
        t2 = i;
      }
    cout << ans << endl << t1 << " " << t2 << endl;
  }
  return 0;
}
