#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = (int)1e9 + 7;
const int maxn = (int)2e5;
const double eps = 1e-9;
const double pi = acos(-1.0);
int main() {
  int n;
  scanf("%d", &n);
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a.begin(), a.end());
  int maxCount = inf, minNum = 0, delta = 0;
  for (int k = 0; k <= maxn; k++) {
    int maxi = -inf;
    int mini = inf;
    for (int i = 0; i < n; i++) {
      int x = a[i] - (i * k);
      maxi = max(maxi, x);
      mini = min(mini, x);
    }
    int res = (maxi - mini + 1) / 2;
    if (res < maxCount) {
      maxCount = res;
      minNum = mini + res;
      delta = k;
    }
  }
  printf("%d\n%d %d\n", maxCount, minNum, delta);
  return 0;
}
