#include <bits/stdc++.h>
using namespace std;
bool debug = 1;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
long long ln, lk, lm;
int a[1005];
int main() {
  scanf("%d", &n);
  for (int(i) = 0; (i) < (int)(n); (i)++) scanf("%d", a + i);
  sort(a, a + n);
  int ans = (1e9), D, S;
  for (int d = 0; d <= 20000; d++) {
    int l = (1e9), r = -(1e9);
    for (int(i) = 0; (i) < (int)(n); (i)++) {
      int x = i * d - a[i];
      l = min(l, x);
      r = max(r, x);
    }
    int cnt = (r - l + 1) / 2;
    if (cnt < ans) {
      ans = cnt;
      D = d;
      S = cnt - r;
    }
  }
  printf("%d\n%d %d\n", ans, S, D);
  return 0;
}
