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 maxn = 300005;
const long double eps = 1e-9;
int N, Q, A, B;
long double MID[maxn], ans[maxn];
struct NODE {
  long double xl, xr, a, b, c, dx, da, db, dc;
  NODE *l, *r, *f;
  NODE(long double _xl, long double _xr, long double _a = 0, long double _b = 0,
       long double _c = 0, NODE *_l = 0, NODE *_r = 0)
      : xl(_xl),
        xr(_xr),
        a(_a),
        b(_b),
        c(_c),
        dx(0),
        da(0),
        db(0),
        dc(0),
        l(_l),
        r(_r),
        f(0) {
    if (l) l->f = this;
    if (r) r->f = this;
  }
  void adjx(long double _dx) {
    c += (a * -_dx + b) * -_dx, b += 2 * a * -_dx;
    dc += (da * -_dx + db) * -_dx, db += 2 * da * -_dx;
    xl += _dx, xr += _dx;
    dx += _dx;
  }
  void adjy(long double _da, long double _db, long double _dc) {
    a += _da, b += _db, c += _dc;
    da += _da, db += _db, dc += _dc;
  }
  void pushDown() {
    if (!dx && !da && !db && !dc) return;
    if (l) l->adjx(dx), l->adjy(da, db, dc);
    if (r) r->adjx(dx), r->adjy(da, db, dc);
    dx = da = db = dc = 0;
  }
  long double inter(long double x) { return (a * x + b) * x + c; }
} * root;
inline void RR(NODE *x) {
  NODE *t(x->l);
  t->f = x->f;
  if (x->f) (x == x->f->l ? x->f->l : x->f->r) = t;
  x->f = t;
  x->l = t->r;
  if (x->l) x->l->f = x;
  t->r = x;
}
inline void LR(NODE *x) {
  NODE *t(x->r);
  t->f = x->f;
  if (x->f) (x == x->f->l ? x->f->l : x->f->r) = t;
  x->f = t;
  x->r = t->l;
  if (x->r) x->r->f = x;
  t->l = x;
}
pair<NODE *, long double> findMin(NODE *x) {
  long double mid = min<long double>(-x->b / (2 * x->a), Q);
  x->pushDown();
  if (mid < x->xl - eps) return x->l ? findMin(x->l) : make_pair(x, x->xl);
  if (mid > x->xr + eps) return x->r ? findMin(x->r) : make_pair(x, x->xr);
  return make_pair(x, mid);
}
void Splay(NODE *x) {
  while (x->f) {
    if (!x->f->f) {
      x->f->pushDown(), x->pushDown();
      if (x == x->f->l)
        RR(x->f);
      else
        LR(x->f);
    } else {
      x->f->f->pushDown(), x->f->pushDown(), x->pushDown();
      if (x == x->f->l && x->f == x->f->f->l)
        RR(x->f->f), RR(x->f);
      else if (x == x->f->r && x->f == x->f->f->l)
        LR(x->f), RR(x->f);
      else if (x == x->f->l && x->f == x->f->f->r)
        RR(x->f), LR(x->f);
      else
        LR(x->f->f), LR(x->f);
    }
  }
  x->pushDown();
}
int main() {
  scanf("%d%d%d%d", &N, &Q, &A, &B);
  root = new NODE(1, Q);
  pair<NODE *, long double> MIN;
  NODE *p;
  for (int i = 1; i <= N; i++) {
    if (i > 1)
      if (A < B) {
        MIN = findMin(root);
        p = MIN.first;
        long double &mid = MID[i];
        mid = MIN.second;
        Splay(p);
        NODE *q0, *q1(p->l), *q2(p->r);
        if (mid - p->xl > eps)
          q1 = new NODE(p->xl, mid, p->a, p->b, p->c, p->l, 0);
        if (p->xr - mid > eps)
          q2 = new NODE(mid, p->xr, p->a, p->b, p->c, 0, p->r);
        if (q1) q1->adjx(A);
        if (q2) q2->adjx(B);
        q0 = new NODE(mid + A, mid + B, 0, 0, p->inter(mid), q1, q2);
        root = q0;
        delete p;
      } else
        root->adjx(A);
    double x;
    scanf("%lf", &x);
    root->adjy(1, -2 * x, x * x);
  }
  MIN = findMin(root);
  p = MIN.first;
  long double x = MIN.second, y = p->inter(x);
  for (int i = N; i; i--) {
    ans[i] = x;
    if (x > MID[i] + B)
      x -= B;
    else if (x < MID[i] + A)
      x -= A;
    else
      x = MID[i];
  }
  for (int i = 1; i < N; i++) printf("%.8f ", (double)ans[i]);
  printf("%.8f\n%.8f\n", (double)ans[N], (double)y);
  return 0;
}