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 = 1e-8;
const int maxn = 300000;
const int max0 = 1e6;
int n, q, a, b;
int x[maxn + 5];
struct node {
  int k;
  long long b;
  double l, r;
  double delta;
  int deltak;
  long long deltab;
  node *p, *c[2];
  node(const int &_k = 0, const long long &_b = 0, const double &_l = 0,
       const double &_r = 0)
      : k(_k), b(_b), l(_l), r(_r), delta(0), deltak(0), deltab(0), p(NULL) {
    memset(c, 0, sizeof c);
  }
  void flag_delta(const double &_delta) {
    delta += _delta;
    b -= (long long)k * _delta;
    deltab -= (long long)deltak * _delta;
    l += _delta, r += _delta;
  }
  void flag_add(const int &_deltak, const long long &_deltab) {
    deltak += _deltak, deltab += _deltab;
    k += _deltak, b += _deltab;
  }
  void push_down() {
    for (int i = (0), _end_ = (2); i != _end_; ++i)
      if (c[i]) c[i]->flag_delta(delta), c[i]->flag_add(deltak, deltab);
    delta = 0, deltak = deltab = 0;
  }
  int get_pos() {
    if (!this || !p) return 2;
    for (int i = (0), _end_ = (2); i != _end_; ++i)
      if (p->c[i] == this) return i;
    return 2;
  }
  void setc(node *u, const int &kind) {
    if (this && kind < 2) c[kind] = u;
    if (u) u->p = this;
  }
  void rotate() {
    node *p = this->p;
    bool mark = get_pos();
    p->p->setc(this, p->get_pos());
    p->setc(c[mark ^ 1], mark);
    setc(p, mark ^ 1);
  }
  bool is_root() { return get_pos() >= 2; }
  void relax() {
    static node *tmp[maxn + 5];
    int top = 0;
    node *u = this;
    while (!u->is_root()) tmp[top++] = u, u = u->p;
    u->push_down();
    while (top) tmp[--top]->push_down();
  }
  void splay() {
    for (; !is_root(); rotate())
      if (!p->is_root()) (p->get_pos() == get_pos() ? p : this)->rotate();
  }
  void print() {
    if (!this) return;
    push_down();
    c[0]->print();
    fprintf(stderr, "%lf %lf: %d %I64d\n", l, r, k, b);
    c[1]->print();
  }
};
const double oo = 1e100;
double best[maxn + 5];
node mem[max0 + 5];
int mem_calc = 0;
node *rt;
node *new_node(const int &_k = 0, const long long &_b = 0, const double &_l = 0,
               const double &_r = 0) {
  mem[mem_calc] = node(_k, _b, _l, _r);
  return mem + (mem_calc++);
}
int main() {
  scanf("%d%d%d%d", &n, &q, &a, &b);
  for (int i = (0), _end_ = (n); i != _end_; ++i) scanf("%d", x + i);
  rt = new_node(2, -x[0] << 1, 1, oo);
  for (int i = (1), _end_ = (n); i <= _end_; ++i) {
    node *u = rt;
    while (1) {
      u->push_down();
      double left = u->k * u->l + u->b, right = u->k * u->r + u->b;
      if (left > eps && u->c[0])
        u = u->c[0];
      else if (right < -eps && u->c[1])
        u = u->c[1];
      else
        break;
    }
    u->splay();
    rt = u;
    double t = min(u->r, max(u->l, (double)-u->b / u->k));
    long long val = 0;
    bool flag0 = 0, flag1 = 0;
    if (abs(t - u->r) < eps) val = u->r * u->k + u->b, flag0 = 1;
    if (abs(t - u->l) < eps) val = u->l * u->k + u->b, flag1 = 1;
    best[i - 1] = t;
    if (i >= n) break;
    double tmp0 = u->r;
    u->r = t;
    node *tmp = u->c[1];
    u->setc(new_node(u->k, u->b - flag0 * val, t, tmp0), 1);
    if (flag1) u->b -= val;
    u->c[1]->setc(tmp, 1);
    tmp = u->c[1];
    u->setc(new_node(0, 0, t, t + b - a), 1);
    u->c[1]->setc(tmp, 1);
    tmp->flag_delta(b - a);
    u->flag_delta(a);
    u->flag_add(2, -x[i] << 1);
  }
  double cur = min((double)q, best[n - 1]);
  static double ans[maxn + 5];
  double tot = 0;
  ans[n - 1] = cur;
  for (int i = n - 2; i >= 0; --i) {
    double t = best[i];
    if (t + a > cur)
      cur -= a;
    else if (t + b < cur)
      cur -= b;
    else
      cur = t;
    ans[i] = cur;
  }
  for (int i = (0), _end_ = (n); i != _end_; ++i)
    printf("%.15lf ", ans[i]), (tot += (ans[i] - x[i]) * (ans[i] - x[i]));
  printf("\n");
  printf("%.15lf\n", tot);
  return 0;
}