#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
int a[maxn], n, l[maxn], r[maxn];
inline bool Check(int p) {
  for (int i = 0; i < n; i++) l[i] = a[i] - p, r[i] = a[i] + p;
  int dx = 100000, dy = 0;
  for (int i = 1; i < n; i++) dx = min(dx, (r[i] - l[0]) / i);
  for (int i = 1; i < n; i++) dy = max(dy, (l[i] - r[0]) / i);
  for (int i = dy; i <= dx; i++) {
    int L = l[0], R = r[0];
    for (int j = 1; j < n; j++) {
      L = max(L, l[j] - j * i);
      R = min(R, r[j] - j * i);
      if (L > R) break;
    }
    if (L <= R) return true;
  }
  return false;
}
inline int Find(int l, int r) {
  if (l == r) return l;
  if (l + 1 == r) {
    if (Check(l)) return l;
    return r;
  }
  int mid = (l + r) >> 1;
  if (Check(mid)) return Find(l, mid);
  return Find(mid + 1, r);
}
pair<int, int> Ask(int p) {
  for (int i = 0; i < n; i++) l[i] = a[i] - p, r[i] = a[i] + p;
  int dx = 100000, dy = 0;
  for (int i = 1; i < n; i++) dx = min(dx, (r[i] - l[0]) / i);
  for (int i = 1; i < n; i++) dy = max(dy, (l[i] - r[0]) / i);
  for (int i = dy; i <= dx; i++) {
    int L = l[0], R = r[0];
    for (int j = 1; j < n; j++) {
      L = max(L, l[j] - j * i);
      R = min(R, r[j] - j * i);
      if (L > R) break;
    }
    if (L <= R) return make_pair(L, i);
  }
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int ans = Find(0, 20000);
  printf("%d\n", ans);
  pair<int, int> temp = Ask(ans);
  printf("%d %d\n", temp.first, temp.second);
  return 0;
}
