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;
struct atype {
  double a, b, l;
  atype() {}
  atype(double a, double b, double l) : a(a), b(b), l(l) {}
};
int d[50010], ll[50010], rr[50010];
vector<atype> f;
vector<atype> delevent[50010];
vector<int> insevent[50010];
double z[50010];
double getmin(double dl, double dr) {
  int sz = f.size();
  double fe = -1e100, fm = 1e100;
  for (int k = (0); k <= (sz - 2); k++) {
    double lx = f[k].l, rx = f[k + 1].l;
    if (lx < dl) lx = dl;
    if (rx > dr) rx = dr;
    if (lx > rx) continue;
    double ly = f[k].a * lx + f[k].b, ry = f[k].a * rx + f[k].b;
    if (ly < 0 && ry > 0) return -f[k].b / f[k].a;
    if (ry <= 0 && rx > fe) fe = rx;
    if (ly >= 0 && lx < fm) fm = lx;
  }
  if (fe < 0)
    return fm;
  else
    return fe;
}
double final[50010];
int ty[50010], dval[50010];
void lemon() {
  int n, Sm, da, db;
  scanf("%d%d%d%d", &n, &Sm, &da, &db);
  for (int i = (1); i <= (n); i++) scanf("%d", &d[i]);
  for (int i = (1); i <= (n); i++)
    ll[i] = 1 + (i - 1) * da, rr[i] = Sm - (n - i) * da;
  f.push_back(atype(2, -2 * d[1], ll[1]));
  f.push_back(atype(2, -2 * d[1], rr[1]));
  for (int i = (2); i <= (n); i++) {
    for (typeof((f).begin()) it = (f).begin(); it != (f).end(); it++)
      *it = atype(it->a, it->b - it->a * da, it->l + da);
    int sz = f.size();
    for (int k = (0); k <= (sz - 1); k++) z[k] = f[k].a * f[k].l + f[k].b;
    if (z[sz - 1] >= 0) {
      int where;
      for (int k = (0); k <= (sz - 1); k++)
        if (z[k] >= 0) {
          where = k;
          break;
        }
      if (where == 0) {
        ty[i] = 1;
        for (typeof((f).begin()) it = (f).begin(); it != (f).end(); it++)
          it->l += db - da, it->b -= it->a * (db - da);
        f.insert(f.begin(), atype(0, 0, ll[i]));
        insevent[i].push_back(0);
      } else {
        if (f[where - 1].a * f[where].l + f[where - 1].b < 1e-8) {
          ty[i] = 2;
          dval[i] = where;
          for (int k = (where); k <= (sz - 1); k++)
            f[k].l += db - da, f[k].b -= f[k].a * (db - da);
          f.insert(f.begin() + where, atype(0, 0, f[where].l - (db - da)));
          insevent[i].push_back(where);
        } else {
          ty[i] = 3;
          dval[i] = where;
          double pl = -f[where - 1].b / f[where - 1].a;
          for (int k = (where); k <= (sz - 1); k++)
            f[k].l += db - da, f[k].b -= f[k].a * (db - da);
          f.insert(f.begin() + where,
                   atype(f[where - 1].a, -f[where - 1].a * (pl + db - da),
                         pl + db - da));
          f.insert(f.begin() + where, atype(0, 0, pl));
          insevent[i].push_back(where);
          insevent[i].push_back(where);
        }
      }
    } else
      ty[i] = 0;
    while (f.back().l + 1e-8 >= rr[i]) {
      delevent[i].push_back(f.back());
      f.pop_back();
    }
    f.push_back(atype(f.back().a, f.back().b, rr[i]));
    for (typeof((f).begin()) it = (f).begin(); it != (f).end(); it++)
      it->a += 2, it->b -= 2 * d[i];
  }
  double dl = ll[n], dr = rr[n];
  for (int i = (n); i >= (1); i--) {
    final[i] = getmin(dl, dr);
    dl = final[i] - db;
    dr = final[i] - da;
    if (dl < ll[i - 1]) dl = ll[i - 1];
    if (i == 1) continue;
    for (typeof((f).begin()) it = (f).begin(); it != (f).end(); it++)
      it->a -= 2, it->b += 2 * d[i];
    f.pop_back();
    for (int k = (delevent[i].size() - 1); k >= (0); k--)
      f.push_back(delevent[i][k]);
    for (typeof((insevent[i]).begin()) it = (insevent[i]).begin();
         it != (insevent[i]).end(); it++)
      f.erase(f.begin() + (*it));
    int sz = f.size();
    if (ty[i] == 1) {
      for (typeof((f).begin()) it = (f).begin(); it != (f).end(); it++)
        it->l -= db - da, it->b += it->a * (db - da);
    } else if (ty[i] == 2) {
      for (int k = (dval[i]); k <= (sz - 1); k++)
        f[k].l -= db - da, f[k].b += f[k].a * (db - da);
    } else if (ty[i] == 3) {
      for (int k = (dval[i]); k <= (sz - 1); k++)
        f[k].l -= db - da, f[k].b += f[k].a * (db - da);
    }
    for (typeof((f).begin()) it = (f).begin(); it != (f).end(); it++)
      *it = atype(it->a, it->b + it->a * da, it->l - da);
  }
  double finalcost = 0;
  for (int i = (1); i <= (n); i++) {
    printf("%.10lf ", final[i]);
    finalcost += (final[i] - d[i]) * (final[i] - d[i]);
  }
  printf("\n%.10lf\n", finalcost);
}
int main() {
  ios::sync_with_stdio(true);
  lemon();
  return 0;
}