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 int MAXN = 300000 + 10;
const int MAXM = 100 + 10;
const int MOD = 51061;
const int INF = 1000000001;
const double EPS = 1e-10;
int q;
struct Node {
  double x, y;
  double px, pk, pb;
  Node *ch[2], *p;
  Node() { px = pk = pb = 0; }
  void add(double v) {
    x += v;
    px += v;
    pb -= pk * v;
  }
  void add(double k, double b) {
    pk += k;
    pb += b;
    y += k * x + b;
  }
  void down() {
    if (fabs(px) > EPS) {
      ch[0]->add(px);
      ch[1]->add(px);
      px = 0;
    }
    if (fabs(pk) > EPS || fabs(pb) > EPS) {
      ch[0]->add(pk, pb);
      ch[1]->add(pk, pb);
      pk = pb = 0;
    }
  }
  void link(Node *x, bool dir) {
    ch[dir] = x;
    x->p = this;
  }
  bool dir() const { return p->ch[1] == this; }
} * nil, *root, node[MAXN];
void rotate(Node *now, bool dir) {
  Node *tmp = now->ch[dir];
  if (now == root)
    root = tmp;
  else
    now->p->link(tmp, now->dir());
  now->link(tmp->ch[dir ^ 1], dir);
  tmp->link(now, dir ^ 1);
}
void splay(Node *now) {
  static stack<Node *> sta;
  Node *cur = now;
  sta.push(cur);
  for (; cur != root; cur = cur->p) sta.push(cur->p);
  while (!sta.empty()) {
    sta.top()->down();
    sta.pop();
  }
  while (now != root) {
    Node *fa = now->p;
    bool d1 = now->dir();
    if (fa == root) {
      rotate(fa, d1);
      return;
    }
    Node *pa = fa->p;
    bool d2 = fa->dir();
    if (d1 ^ d2) {
      rotate(fa, d1);
      rotate(pa, d2);
    } else {
      rotate(pa, d2);
      rotate(fa, d1);
    }
  }
}
int tnode;
Node *newNode() {
  node[tnode].ch[0] = nil;
  node[tnode].ch[1] = nil;
  return &node[tnode++];
}
void init() { root = nil = newNode(); }
void insert(Node *&now, double x, double y, Node *fa = nil) {
  if (now == nil) {
    now = newNode();
    now->x = x;
    now->y = y;
    now->p = fa;
    splay(now);
    return;
  }
  now->down();
  insert(now->ch[x > now->x], x, y, now);
}
Node *getZero(Node *now) {
  if (now == nil) return nil;
  now->down();
  if (now->y > 0 || now->x > q) {
    Node *tmp = getZero(now->ch[0]);
    if (tmp != nil) return tmp;
    return now;
  } else {
    Node *tmp = getZero(now->ch[1]);
    if (tmp != nil && tmp->y < 0) return tmp;
    return now;
  }
}
Node *getMax(Node *now) {
  if (now == nil) return nil;
  while (now->ch[1] != nil) {
    now->down();
    now = now->ch[1];
  }
  return now;
}
Node *getMin(Node *now) {
  if (now == nil) return nil;
  while (now->ch[0] != nil) {
    now->down();
    now = now->ch[0];
  }
  return now;
}
double x[MAXN], y[MAXN];
double f(double k, double b, double x) { return k * x + b; }
double getZero(double x1, double y1, double x2, double y2) {
  if (fabs(y1 - y2) < EPS) return x1;
  return (x2 * y1 - x1 * y2) / (y1 - y2);
}
void print(Node *now) {
  if (now == nil) return;
  now->down();
  print(now->ch[0]);
  cout << "(" << now->x << "," << now->y << ")" << endl;
  print(now->ch[1]);
}
double getZero() {
  Node *cur = getZero(root);
  splay(cur);
  if (cur->y > 0) return cur->x;
  Node *R = getMin(cur->ch[1]);
  if (R->y < 0) return q;
  return min((double)q, getZero(cur->x, cur->y, R->x, R->y));
}
int main() {
  ios::sync_with_stdio(false);
  int n, a, b;
  cin >> n >> q >> a >> b;
  for (int i = 1; i <= n; i++) cin >> x[i];
  init();
  insert(root, q, f(2, -2 * x[1], q));
  insert(root, 1, f(2, -2 * x[1], 1));
  y[1] = x[1];
  for (int i = 2; i <= n; i++) {
    double X = y[i - 1];
    if (root->y <= 0) {
      root->ch[1]->add(b);
      root->x += a;
      root->ch[0]->add(a);
    } else
      root->add(b);
    insert(root, X + a, 0);
    insert(root, X + b, 0);
    root->add(2, -2 * x[i]);
    y[i] = getZero();
  }
  for (int i = n - 1; i >= 1; i--) {
    if (y[i] + b < y[i + 1])
      y[i] = y[i + 1] - b;
    else if (y[i] + a > y[i + 1])
      y[i] = y[i + 1] - a;
  }
  cout.setf(ios::fixed);
  cout.precision(10);
  for (int i = 1; i <= n; i++) cout << y[i] << " ";
  cout << endl;
  double ans = 0;
  for (int i = 1; i <= n; i++) ans += ((y[i] - x[i]) * (y[i] - x[i]));
  cout << ans << endl;
  return 0;
}