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>
const double inf = 1e19;
const double eps = 1e-9;
int ch[600050][2];
double K[600050], B[600050], L[600050], R[600050];
double TK[600050], TB[600050], TX[600050];
int fa[600050];
double x[300050], y[300050];
double q, a, b;
int n, tot, root;
inline int dir(int x) { return x == ch[fa[x]][1]; }
inline void mutate(int x, double tk, double tb, double tx) {
  if (x >= 3) {
    L[x] += tx;
    R[x] += tx;
    B[x] += tb - K[x] * tx;
    K[x] += tk;
  }
  if (x) {
    TX[x] += tx;
    TB[x] += tb - TK[x] * tx;
    TK[x] += tk;
  }
}
inline void release(int x) {
  mutate(ch[x][0], TK[x], TB[x], TX[x]);
  mutate(ch[x][1], TK[x], TB[x], TX[x]);
  TK[x] = 0;
  TB[x] = 0;
  TX[x] = 0;
}
inline void rotate(int x) {
  int y, z, a, b, c;
  y = fa[x];
  z = fa[y];
  b = dir(x);
  a = ch[x][!b];
  if (z) {
    c = dir(y);
    ch[z][c] = x;
  } else
    root = x;
  fa[x] = z;
  fa[y] = x;
  ch[x][!b] = y;
  ch[y][b] = a;
  if (a) fa[a] = y;
}
void splay(int x, int i) {
  int y, z, b, c;
  while (fa[x] != i) {
    y = fa[x];
    z = fa[y];
    if (z == i) {
      release(y);
      release(x);
      rotate(x);
    } else {
      b = dir(x);
      c = dir(y);
      release(z);
      release(y);
      release(x);
      if (b ^ c) {
        rotate(x);
        rotate(x);
      } else {
        rotate(y);
        rotate(x);
      }
    }
  }
  release(x);
}
inline void newnode(int f, int d, double k, double b, double l, double r) {
  tot++;
  ch[tot][0] = 0;
  ch[tot][1] = 0;
  fa[tot] = f;
  if (f)
    ch[f][d] = tot;
  else
    root = tot;
  K[tot] = k;
  B[tot] = b;
  L[tot] = l;
  R[tot] = r;
  TK[tot] = 0;
  TB[tot] = 0;
  TX[tot] = 0;
}
int find_minmax(int i, int d) {
  while (ch[i][d]) {
    release(i);
    i = ch[i][d];
  }
  return i;
}
inline double calc(int i, double x) { return K[i] * x + B[i]; }
int find(int x) {
  int y;
  if (x < 3) return 0;
  release(x);
  if (K[x] * R[x] + B[x] >= 0) {
    y = find(ch[x][0]);
    if (y)
      return y;
    else
      return x;
  }
  return find(ch[x][1]);
}
int main() {
  double ans;
  int i, X, Y;
  scanf("%d%lf%lf%lf", &n, &q, &a, &b);
  for (i = 1; i <= n; i++) scanf("%lf", &x[i]);
  tot = 0;
  newnode(0, 0, 0, -inf, -inf, -inf);
  newnode(1, 1, 0, inf, inf, inf);
  newnode(2, 0, 2, -x[1] * 2, 1, q - (n - 1) * a);
  for (i = 1; i <= n; i++) {
    splay(1, 0);
    splay(2, 1);
    X = ch[2][0];
    Y = find_minmax(X, 1);
    if (K[Y] * R[Y] + B[Y] < 0)
      y[i] = R[Y];
    else {
      Y = find(X);
      if (K[Y] * L[Y] + B[Y] > 0)
        y[i] = L[Y];
      else
        y[i] = -B[Y] / K[Y];
    }
    if (i < n) {
      if (b - a > eps) {
        splay(Y, 0);
        if (y[i] - L[Y] < eps) {
          X = find_minmax(ch[Y][0], 1);
          splay(X, Y);
          newnode(X, 1, 0, 0, y[i] + a, y[i] + b);
        } else if (R[Y] - y[i] < eps) {
          X = find_minmax(ch[Y][1], 0);
          splay(X, Y);
          newnode(X, 0, 0, 0, y[i] + a, y[i] + b);
        } else {
          X = find_minmax(ch[Y][1], 0);
          splay(X, Y);
          newnode(X, 0, K[Y], B[Y], y[i], R[Y]);
          R[Y] = y[i];
          newnode(tot, 0, 0, 0, y[i] + a, y[i] + b);
        }
        splay(tot, 0);
        mutate(ch[tot][0], 0, 0, a);
        mutate(ch[tot][1], 0, 0, b);
      } else
        mutate(root, 0, 0, a);
      mutate(root, 2, -x[i + 1] * 2, 0);
      splay(2, 0);
      Y = find_minmax(ch[2][0], 1);
      while (L[Y] >= q - (n - i - 1) * a) {
        splay(Y, 2);
        X = ch[Y][0];
        ch[2][0] = X;
        fa[X] = 2;
        Y = find_minmax(ch[2][0], 1);
      }
      if (R[Y] > q - (n - i - 1) * a) R[Y] = q - (n - i - 1) * a;
    }
  }
  for (i = n - 1; i >= 1; i--)
    if (y[i + 1] - y[i] < a)
      y[i] = y[i + 1] - a;
    else if (y[i + 1] - y[i] > b)
      y[i] = y[i + 1] - b;
  ans = 0;
  for (i = 1; i <= n; i++) {
    printf("%.7lf ", y[i]);
    ans += (y[i] - x[i]) * (y[i] - x[i]);
  }
  printf("\n%.7lf\n", ans);
  return 0;
}