Problem: You've got a non-decreasing sequence x1, x2, ..., xn (1 ≤ x1 ≤ x2 ≤ ... ≤ xn ≤ q). You've also got two integers a and b (a ≤ b; a·(n - 1) < q).

Your task is to transform sequence x1, x2, ..., xn into some sequence y1, y2, ..., yn (1 ≤ yi ≤ q; a ≤ yi + 1 - yi ≤ b). The transformation price is the following sum: <image>. Your task is to choose such sequence y that minimizes the described transformation price.

Input

The first line contains four integers n, q, a, b (2 ≤ n ≤ 6000; 1 ≤ q, a, b ≤ 109; a·(n - 1) < q; a ≤ b).

The second line contains a non-decreasing integer sequence x1, x2, ..., xn (1 ≤ x1 ≤ x2 ≤ ... ≤ xn ≤ q).

Output

In the first line print n real numbers — the sought sequence y1, y2, ..., yn (1 ≤ yi ≤ q; a ≤ yi + 1 - yi ≤ b). In the second line print the minimum transformation price, that is, <image>.

If there are multiple optimal answers you can print any of them.

The answer will be considered correct if the absolute or relative error doesn't exceed 10 - 6.

Examples

Input

3 6 2 2
1 4 6


Output

1.666667 3.666667 5.666667 
0.666667


Input

10 100000 8714 9344
3378 14705 17588 22672 32405 34309 37446 51327 81228 94982


Output

1.000000 8715.000000 17429.000000 26143.000000 34857.000000 43571.000000 52285.000000 61629.000000 70973.000000 80317.000000 
797708674.000000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3fffffff;
const int SINF = 0x7fffffff;
const long long LINF = 0x3fffffffffffffff;
const long long SLINF = 0x7fffffffffffffff;
const double DINF = 1e100;
const int MAXN = 6007;
const int MAXL = 15007;
const double EPS = 1e-12;
int n, q, a, b;
int xx[MAXN];
class fT {
 public:
  fT() : kk(0) {}
  void setd(int _k, int _b, int _l, int _r) {
    k[0] = _k, b[0] = _b, bn[0] = _l, bn[1] = _r, kk = 1;
  }
  void operator+=(const fT &x) { (*this) = (*this) + x; }
  fT operator+(const fT &x) const {
    fT ans;
    double ll = (((bn[0]) > (x.bn[0])) ? (bn[0]) : (x.bn[0])),
           rr = (((bn[kk]) < (x.bn[x.kk])) ? (bn[kk]) : (x.bn[x.kk]));
    int i1 = 0, i2 = 0;
    while (i1 <= kk && i2 <= x.kk) {
      if (i1 <= kk && bn[i1] < x.bn[i2]) {
        if ((!ans.kk || bn[i1] != ans.bn[ans.kk - 1]) &&
            (bn[i1] >= ll && bn[i1] <= rr))
          ans.bn[ans.kk++] = bn[i1];
        ++i1;
      } else {
        if ((!ans.kk || x.bn[i2] != ans.bn[ans.kk - 1]) &&
            (x.bn[i2] >= ll && x.bn[i2] <= rr))
          ans.bn[ans.kk++] = x.bn[i2];
        ++i2;
      }
    }
    --ans.kk;
    if (!ans.kk) ++ans.kk, ans.bn[ans.kk] = ans.bn[ans.kk - 1];
    int id1 = 0, id2 = 0;
    for (int i = 0; i < ans.kk; ++i) {
      while (id1 + 1 < kk && bn[id1 + 1] <= ans.bn[i]) ++id1;
      while (id2 + 1 < x.kk && x.bn[id2 + 1] <= ans.bn[i]) ++id2;
      ans.k[i] = k[id1] + x.k[id2];
      ans.b[i] = b[id1] + x.b[id2];
    }
    return ans;
  }
  void move(int ll, int rr) {
    for (int i = 0; i < kk; ++i) {
      bn[i] += ll;
      if (k[i]) b[i] -= k[i] * ll;
    }
    bn[kk] += ll;
    minp += ll;
    if (rr - ll) {
      for (int i = 0; i < kk; ++i) {
        if (minp >= bn[i] && minp <= bn[i + 1]) {
          if (minp - bn[i] > EPS) {
            bn[kk + 1] = bn[kk];
            for (int j = kk; j > i; --j)
              bn[j] = bn[j - 1], k[j] = k[j - 1], b[j] = b[j - 1];
            ++kk;
            bn[i + 1] = minp;
          } else
            --i;
          double del = rr - ll;
          bn[kk + 1] = bn[kk] + del;
          for (int j = kk; j > i + 1; --j)
            bn[j] = bn[j - 1] + del, k[j] = k[j - 1],
            b[j] = b[j - 1] - k[j - 1] * del;
          ++kk;
          bn[i + 2] = minp + del;
          k[i + 1] = 0;
          b[i + 1] = 0;
          break;
        }
      }
    }
  }
  double f(double x, int bid) { return (k[bid] * x + b[bid]); }
  double calcmin() {
    vmin = DINF;
    double v1, v2;
    for (int i = 0; i < kk; ++i) {
      v1 = f(bn[i], i), v2 = f(bn[i + 1], i);
      if (v1 > 0) {
        if (v1 < (((vmin) >= 0) ? (vmin) : (-(vmin)))) minp = bn[i], vmin = v1;
      } else if (v2 < 0) {
        if ((((v2) >= 0) ? (v2) : (-(v2))) <
            (((vmin) >= 0) ? (vmin) : (-(vmin))))
          minp = bn[i + 1], vmin = v2;
      } else {
        if (k[i])
          minp = -b[i] / k[i];
        else
          minp = bn[i];
        vmin = 0;
        break;
      }
    }
    return minp;
  }
  void print() {
    for (int i = 0; i < kk; ++i) {
      if (b[i] >= 0)
        printf("x=[%.6lf][%.6lf]: y=%.6lfx+%.6lf   R=[%.6lf][%.6lf]\n", bn[i],
               bn[i + 1], k[i], b[i], f(bn[i], i), f(bn[i + 1], i));
      else
        printf("x=[%.6lf][%.6lf]: y=%.6lfx%.6lf   R=[%.6lf][%.6lf]\n", bn[i],
               bn[i + 1], k[i], b[i], f(bn[i], i), f(bn[i + 1], i));
    }
    printf("minp=%.6lf   f(minp)=%.6lf\n", minp, vmin);
  }

 private:
  int kk;
  double k[MAXL], b[MAXL], bn[MAXL], minp, vmin;
} func1, func2, tmp;
double mp[MAXN];
void init();
void input();
void work();
double getmin(int lev, double nx);
int main() {
  init();
  input();
  work();
}
void init() { ios::sync_with_stdio(false); }
void input() {
  scanf("%d%d%d%d", &n, &q, &a, &b);
  for (int i = 1; i <= n; ++i) scanf("%d", &xx[i]);
}
void work() {
  fT *func = &func1, *la = &func2, *t;
  la->setd(2, -2 * xx[1], 1, q);
  la->calcmin();
  mp[1] = xx[1];
  for (int i = 2; i <= n; ++i) {
    *func = *la;
    func->move(a, b);
    tmp.setd(2, -2 * xx[i], a * (i - 1) + 1, q);
    *func += tmp;
    mp[i] = func->calcmin();
    t = func;
    func = la;
    la = t;
  }
  double ans = getmin(n, mp[n]);
  printf("%.9lf\n%.9lf\n", mp[n], ans);
}
double getmin(int lev, double nx) {
  if (lev == 1) return ((nx - xx[1]) * (nx - xx[1]));
  double tl = nx - b, tr = nx - a, cho;
  tl = (((tl) > (1LL * a * (lev - 2) + 1)) ? (tl) : (1LL * a * (lev - 2) + 1));
  double ans = ((nx - xx[lev]) * (nx - xx[lev]));
  if (tl > mp[lev - 1])
    ans += getmin(lev - 1, tl), cho = tl;
  else if (tr < mp[lev - 1])
    ans += getmin(lev - 1, tr), cho = tr;
  else
    ans += getmin(lev - 1, mp[lev - 1]), cho = mp[lev - 1];
  printf("%.9lf ", cho);
  return ans;
}