#include <bits/stdc++.h>
const int inf = 0xfffffff;
const long long INF = 1ll << 61;
using namespace std;
int n;
int nnum[1000 + 55];
int k, minn, d;
void init() { memset(nnum, 0, sizeof(nnum)); }
bool input() {
  while (scanf("%d", &n) == 1) {
    for (int i = 0; i < n; i++) scanf("%d", &nnum[i]);
    return false;
  }
  return true;
}
void cal() {
  sort(nnum, nnum + n);
  k = inf;
  for (int i = 0; i < 20000 + 55; i++) {
    int left = inf, right = -inf;
    for (int j = 0; j < n; j++) {
      left = min(left, i * j - nnum[j]);
      right = max(right, i * j - nnum[j]);
    }
    int tmp = (right - left + 1) >> 1;
    if (k > tmp) {
      k = tmp;
      minn = tmp - right;
      d = i;
    }
  }
}
void output() {
  cout << k << endl;
  cout << minn << " " << d;
}
int main() {
  while (true) {
    init();
    if (input()) return 0;
    cal();
    output();
  }
}
