#include <bits/stdc++.h>
using namespace std;
int kkaass = 1;
int n;
int ar[100009];
int main() {
  ios_base::sync_with_stdio(false);
  int i, j;
  while (cin >> n) {
    for (i = 0; i < (n); i++) cin >> ar[i];
    sort(ar, ar + n);
    int mn = (1 << 30), mx = -(1 << 30);
    int bun = (1 << 30), st, g;
    for (int gap = 0; gap <= 25000; gap++) {
      mn = (1 << 30), mx = -(1 << 30);
      for (i = 0; i < n; i++) {
        mn = min(mn, ar[i] - i * gap);
        mx = max(mx, ar[i] - i * gap);
      }
      int mid = (mx + mn) / 2;
      int cost = max(mid - mn, mx - mid);
      if (cost < bun) {
        bun = cost;
        st = mid;
        g = gap;
      }
    }
    cout << bun << endl;
    cout << st << " " << g << endl;
  }
  return 0;
}
