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;
int Read() {
  char c;
  while (c = getchar(), (c != '-') && (c < '0' || c > '9'))
    ;
  bool neg = (c == '-');
  int ret = (neg ? 0 : c - 48);
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + c - 48;
  return neg ? -ret : ret;
}
template <class T>
T SQR(T x) {
  return x * x;
}
const int MAXN = 300005;
const long double eps = 1e-10;
struct node {
  long double l, r, a, b, c, dx, da, db, dc;
  int fa, son[2];
  long double F(long double x) { return a * SQR(x) + b * x + c; }
} t[MAXN << 1];
int N, Q, A, B, root, cnt;
long double ans[MAXN], apex[MAXN];
int CreateNew(long double l, long double r, long double a = 0,
              long double b = 0, long double c = 0, int c0 = 0, int c1 = 0) {
  return t[++cnt].l = l, t[cnt].r = r, t[cnt].a = a, t[cnt].b = b, t[cnt].c = c,
         t[cnt].son[0] = c0, t[cnt].son[1] = c1, cnt;
}
void MarkX(int x, long double dx) {
  t[x].c += t[x].a * SQR(dx) - t[x].b * dx;
  t[x].dc += t[x].da * SQR(dx) - t[x].db * dx;
  t[x].b += -2 * t[x].a * dx, t[x].db += -2 * t[x].da * dx;
  t[x].l += dx, t[x].r += dx, t[x].dx += dx;
}
void MarkY(int x, long double da, long double db, long double dc) {
  t[x].a += da, t[x].b += db, t[x].c += dc;
  t[x].da += da, t[x].db += db, t[x].dc += dc;
}
void Pushdown(int x) {
  for (int i = 0; i <= 1; i++)
    if (t[x].son[i])
      MarkX(t[x].son[i], t[x].dx),
          MarkY(t[x].son[i], t[x].da, t[x].db, t[x].dc);
  t[x].dx = t[x].da = t[x].db = t[x].dc = 0;
}
void Rotate(int x, int tp) {
  int y = t[x].fa;
  Pushdown(y), Pushdown(x);
  t[y].son[!tp] = t[x].son[tp];
  t[x].fa = t[y].fa;
  if (t[x].son[tp]) t[t[x].son[tp]].fa = y;
  if (t[y].fa)
    t[t[y].fa].son[t[t[y].fa].son[1] == y] = x;
  else
    root = x;
  t[y].fa = x, t[x].son[tp] = y;
}
void Splay(int x) {
  for (Pushdown(x); t[x].fa;)
    if (t[x].fa == root)
      Rotate(x, t[t[x].fa].son[0] == x);
    else {
      int y = t[x].fa, z = t[y].fa;
      if (y == t[z].son[0])
        if (x == t[y].son[0])
          Rotate(y, 1), Rotate(x, 1);
        else
          Rotate(x, 0), Rotate(x, 1);
      else if (x == t[y].son[1])
        Rotate(y, 0), Rotate(x, 0);
      else
        Rotate(x, 1), Rotate(x, 0);
    }
}
long double FindOpt(int x) {
  for (;;) {
    Pushdown(x);
    long double opt = min(-t[x].b * 0.5 / t[x].a, (long double)Q);
    if (opt < t[x].l - eps)
      if (t[x].son[0])
        x = t[x].son[0];
      else
        return Splay(x), t[x].l;
    else if (opt > t[x].r + eps)
      if (t[x].son[1])
        x = t[x].son[1];
      else
        return Splay(x), t[x].r;
    else
      return Splay(x), opt;
  }
}
int main() {
  scanf("%d%d%d%d", &N, &Q, &A, &B);
  memset(t, 0, sizeof(t));
  root = CreateNew(1, Q);
  for (int i = 1; i <= N; i++) {
    if (i > 1) {
      if (A < B) {
        long double opt = FindOpt(root);
        apex[i] = opt;
        int l(t[root].son[0]), r(t[root].son[1]);
        if (opt - t[root].l > eps) {
          l = CreateNew(t[root].l, opt, t[root].a, t[root].b, t[root].c,
                        t[root].son[0], 0);
          if (t[root].son[0]) t[t[root].son[0]].fa = l;
          t[l].fa = root;
        }
        if (t[root].r - opt > eps) {
          r = CreateNew(opt, t[root].r, t[root].a, t[root].b, t[root].c, 0,
                        t[root].son[1]);
          if (t[root].son[1]) t[t[root].son[1]].fa = r;
          t[r].fa = root;
        }
        if (l) MarkX(l, A);
        if (r) MarkX(r, B);
        t[root].c = t[root].F(opt);
        t[root].son[0] = l, t[root].son[1] = r, t[root].l = opt + A,
        t[root].r = opt + B;
        t[root].a = t[root].b = t[root].da = t[root].db = t[root].dc =
            t[root].dx = 0;
      } else
        MarkX(root, A);
    }
    double x;
    scanf("%lf", &x);
    MarkY(root, 1, -2 * x, x * x);
  }
  long double opt = FindOpt(root);
  double sum = t[root].F(opt);
  for (int i = N; i >= 1; i--) {
    ans[i] = opt;
    if (opt > apex[i] + B)
      opt -= B;
    else if (opt < apex[i] + A)
      opt -= A;
    else
      opt = apex[i];
  }
  for (int i = 1; i <= N; i++)
    printf("%.10f%c", (double)ans[i], i < N ? ' ' : '\n');
  printf("%.10f\n", sum);
  return 0;
}