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;
template <typename T>
void get_int(T &x) {
  char t = getchar();
  bool neg = false;
  x = 0;
  for (; (t > '9' || t < '0') && t != '-'; t = getchar())
    ;
  if (t == '-') neg = true, t = getchar();
  for (; t <= '9' && t >= '0'; t = getchar()) x = x * 10 + t - '0';
  if (neg) x = -x;
}
template <typename T>
void print_int(T x) {
  if (x < 0) putchar('-'), x = -x;
  short a[20] = {}, sz = 0;
  while (x > 0) a[sz++] = x % 10, x /= 10;
  if (sz == 0) putchar('0');
  for (int i = sz - 1; i >= 0; i--) putchar('0' + a[i]);
}
const int inf = 0x3f3f3f3f;
const long long Linf = 1ll << 61;
const double pi = acos(-1.0);
const double eps = 1e-10;
struct quadra {
  int a;
  double b, c, l, r;
  quadra(const int a = 0, const double b = 0.0, const double c = 0.0,
         const double l = 0.0, const double r = 0.0) {
    this->a = a;
    this->b = b;
    this->c = c;
    this->l = l;
    this->r = r;
  }
  quadra move(const double t, const double l, const double r) {
    return quadra(a, b - (2.0 * a) * t, (1.0 * a) * t * t - b * t + c, l, r);
  }
  double qmin(double &pos) {
    pos = -0.5 * b / (a * 1.0);
    if (pos < l) pos = l;
    if (pos > r) pos = r;
    return a * pos * pos + b * pos + c;
  }
};
struct function {
  quadra a[12011], ta[12011];
  int n, tn;
  double qmin(double &pos) {
    double ret = 1e100, cpos, c;
    for (int i = 1; i <= n; i++) {
      if (ret > (c = a[i].qmin(cpos))) {
        ret = c;
        pos = cpos;
      }
    }
    return ret;
  }
  double addone(const quadra &t, double &P, int aa, int bb, double l,
                double r) {
    double pos, mn;
    mn = qmin(pos);
    tn = 0;
    bool flag = 0;
    for (int i = 1; i <= n; i++) {
      if (pos >= a[i].l && pos <= a[i].r && !flag) {
        flag = 1;
        ta[++tn] = a[i].move(aa, a[i].l + aa * 1.0, pos + aa * 1.0);
        ta[++tn] = quadra(0, 0, mn, pos + aa * 1.0, pos + bb * 1.0);
        ta[++tn] = a[i].move(bb, pos + bb * 1.0, a[i].r + bb * 1.0);
      } else if (pos >= a[i].r)
        ta[++tn] = a[i].move(aa, a[i].l + aa * 1.0, a[i].r + aa * 1.0);
      else if (pos <= a[i].l)
        ta[++tn] = a[i].move(bb, a[i].l + bb * 1.0, a[i].r + bb * 1.0);
    }
    for (int i = 1; i <= tn; i++) {
      ta[i].a += t.a;
      ta[i].b += t.b;
      ta[i].c += t.c;
      ta[i].l = max(ta[i].l, l);
      ta[i].r = min(ta[i].r, r);
    }
    n = 0;
    for (int i = 1; i <= tn; i++)
      if (ta[i].l < ta[i].r) a[++n] = ta[i];
    return qmin(P);
  }
} thor;
int n, q, a, b, y[6666];
double p[6666], mn[6666], ans[6666];
int main() {
  get_int(n), get_int(q);
  get_int(a), get_int(b);
  for (int i = 1; i <= n; i++) {
    int &x = y[i];
    get_int(x);
    if (i == 1) {
      thor.n = 1;
      thor.a[1] = quadra(1, -2.0 * x, 1.0 * x * x, 1, q);
      p[1] = x;
      mn[1] = 0.0;
    } else
      mn[i] = thor.addone(quadra(1, -2.0 * x, 1.0 * x * x, 1 + (i - 1) * a, q),
                          p[i], a, b, 1 + (i - 1) * a, q);
  }
  ans[n] = p[n];
  for (int i = n - 1; i >= 1; i--) {
    if (p[i] + a > ans[i + 1])
      ans[i] = ans[i + 1] - a;
    else if (p[i] + b < ans[i + 1])
      ans[i] = ans[i + 1] - b;
    else
      ans[i] = p[i];
  }
  double sum = 0;
  for (int i = 1; i <= n; i++) sum = sum + (ans[i] - y[i]) * (ans[i] - y[i]);
  for (int i = 1; i <= n; i++) printf("%.8lf ", ans[i]);
  printf("\n%.8lf\n", sum);
  return 0;
}