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 double eps = 0.00000001;
int cnt, rt, x, n, t, fl;
double M, P, Q, X, w[7000], G[7000], Ans, A[1000][4];
struct O {
  double p, q, pp, k, b, kx, bx, x;
  int l, r, f;
} a[30000];
void ADD(int u, double k, double b) {
  if (!u) return;
  a[u].kx += k;
  a[u].k += k;
  a[u].bx += b;
  a[u].b += b;
}
void up(int u) {
  if (a[u].l)
    a[u].pp = a[a[u].l].pp;
  else
    a[u].pp = a[u].p;
}
void down(int u) {
  if (!u) return;
  if (fabs(a[u].x) > eps) {
    double x = a[u].x;
    a[u].x = 0;
    int v;
    if (v = a[u].l) {
      a[v].pp += x;
      a[v].p += x;
      a[v].q += x;
      a[v].b -= x * a[v].k;
      a[v].bx -= x * a[v].kx;
      a[v].x += x;
    }
    if (v = a[u].r) {
      a[v].pp += x;
      a[v].p += x;
      a[v].q += x;
      a[v].b -= x * a[v].k;
      a[v].bx -= x * a[v].kx;
      a[v].x += x;
    }
  }
  if (fabs(a[u].kx) > eps || fabs(a[u].bx) > eps) {
    ADD(a[u].l, a[u].kx, a[u].bx);
    ADD(a[u].r, a[u].kx, a[u].bx);
    a[u].kx = a[u].bx = 0;
  }
}
void add(int u, double t, double x) {
  if (!u) return;
  if (a[u].pp + eps > t) {
    a[u].pp += x;
    a[u].p += x;
    a[u].q += x;
    a[u].b -= x * a[u].k;
    a[u].bx -= x * a[u].kx;
    a[u].x += x;
    return;
  }
  down(u);
  if (a[u].p + eps > t) {
    a[u].p += x;
    a[u].q += x;
    a[u].b -= x * a[u].k;
    a[u].bx -= x * a[u].kx;
    add(a[u].l, t, x);
  }
  add(a[u].r, t, x);
  up(u);
}
void NEW(double p, double q, double k, double b) {
  ++t;
  a[t].f = (1ll * rand() * rand() + rand()) % 1000000000;
  a[t].p = a[t].pp = p;
  a[t].q = q;
  a[t].k = k;
  a[t].b = b;
}
int find(int u) {
  down(u);
  if (a[u].q * a[u].k + a[u].b < -eps)
    if (a[u].r)
      return find(a[u].r);
    else
      return fl = 2, u;
  if (a[u].p * a[u].k + a[u].b > eps)
    if (a[u].l)
      return find(a[u].l);
    else
      return fl = 1, u;
  return u;
}
void RR(int &u) {
  int v = a[u].l;
  down(v);
  a[u].l = a[v].r;
  a[v].r = u;
  up(u);
  up(v);
  u = v;
}
void LL(int &u) {
  int v = a[u].r;
  down(v);
  a[u].r = a[v].l;
  a[v].l = u;
  up(u);
  up(v);
  u = v;
}
void del(int &u, int v) {
  down(u);
  if (u == v) {
    if (!a[u].l || !a[u].r)
      u = a[u].l + a[u].r;
    else if (a[a[u].l].f < a[a[u].r].f)
      RR(u), del(a[u].r, v);
    else
      LL(u), del(a[u].l, v);
  } else if (a[v].p < a[u].p)
    del(a[u].l, v);
  else
    del(a[u].r, v);
  up(u);
}
void join(int &u, int v) {
  if (!u) {
    u = v;
    return;
  }
  down(u);
  if (a[v].p < a[u].p) {
    join(a[u].l, v);
    up(u);
    if (a[a[u].l].f < a[u].f) RR(u);
  } else {
    join(a[u].r, v);
    up(u);
    if (a[a[u].r].f < a[u].f) LL(u);
  }
}
int main() {
  scanf("%d%lf%lf%lf", &n, &M, &P, &Q);
  for (int i = 1; i <= n; ++i) scanf("%lf", &w[i]);
  rt = 1;
  NEW(1, M, 2, -2 * w[1]);
  for (int i = 2; i <= n; ++i) {
    fl = 0;
    x = find(rt);
    if (fl)
      X = fl == 1 ? a[x].p : a[x].q;
    else
      X = -a[x].b / a[x].k;
    del(rt, x);
    G[i - 1] = X;
    if (a[x].p < X - eps) NEW(a[x].p, X, a[x].k, a[x].b), join(rt, t);
    if (X < a[x].q - eps) NEW(X, a[x].q, a[x].k, a[x].b), join(rt, t);
    add(rt, X, Q - P);
    add(rt, 1, P);
    if (P < Q - eps) NEW(X + P, X + Q, 0, 0), join(rt, t);
    ADD(rt, 2, -2 * w[i]);
  }
  fl = 0;
  x = find(rt);
  if (fl)
    X = fl == 1 ? a[x].p : a[x].q;
  else
    X = -a[x].b / a[x].k;
  G[n] = min(X, M);
  for (int i = n - 1; i; --i) {
    if (G[i] + P > G[i + 1]) G[i] = G[i + 1] - P;
    if (G[i] + Q < G[i + 1]) G[i] = G[i + 1] - Q;
  }
  for (int i = 1; i <= n; ++i) printf("%.6lf ", G[i]);
  for (int i = 1; i <= n; ++i) Ans += (G[i] - w[i]) * (G[i] - w[i]);
  printf("\n%.6lf\n", Ans);
  return 0;
}