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 long double EPS = 1e-9;
const long double PI = acos(-1.0);
const int INF = (int)1e9 + 5;
const long long LINF = (long long)1e18 + 5;
bool eq(double a, double b) { return fabs(a - b) < EPS; }
template <class T>
T sqr(const T& x) {
  return x * x;
}
template <class T>
long long abs(const T& x) {
  return x < 0 ? -x : x;
}
template <class T>
long long myround(const T& x) {
  return x < 0 ? x - 0.5 : x + 0.5;
}
template <class T>
bool chmin(T& x, const T& y) {
  if (y < x) {
    x = y;
    return true;
  }
  return false;
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "{";
  for (typename vector<T>::const_iterator it = v.begin(); it != v.end(); ++it) {
    os << *it;
    if ((it + 1) != v.end()) os << ", ";
  }
  os << "}";
  return os;
}
template <class P, class Q>
ostream& operator<<(ostream& os, const pair<P, Q>& p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <class T>
bool chmax(T& x, const T& y) {
  if (x < y) {
    x = y;
    return true;
  }
  return false;
}
struct pt {
  double x, y;
  pt() {}
  pt(double x, double y) : x(x), y(y) {}
  friend ostream& operator<<(ostream& os, const pt& p) {
    return os << "pt(" << p.x << ", " << p.y << ")";
  }
};
const int N = 6010;
int n, q, a, b;
vector<pt> v[N];
pt extreme[N];
double was[N], nw[N];
double getOnLine(pt a, pt b, double x) {
  return (x - a.x) / (b.x - a.x) * (b.y - a.y) + a.y;
}
double getOnLineX(pt a, pt b, double y) {
  return (y - a.y) / (b.y - a.y) * (b.x - a.x) + a.x;
}
int main() {
  scanf("%d%d%d%d", &n, &q, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%lf", was + i);
  }
  if (eq(was[1], 1) || eq(q, was[1])) {
    v[1] = {pt(1, 2 * 1 - 2 * was[1]), pt(q, 2 * q - 2 * was[1])};
  } else {
    v[1] = {pt(1, 2 * 1 - 2 * was[1]), pt(was[1], 0),
            pt(q, 2 * q - 2 * was[1])};
  }
  extreme[1].x = was[1];
  for (int i = 2; i <= n; i++) {
    auto& prv = v[i - 1];
    auto& cur = v[i];
    cur.reserve(prv.size() + 4);
    int posOfExtreme = -1;
    for (int j = 0, r = (int)prv.size(); j < r; j++) {
      if (eq(extreme[i - 1].x, prv[j].x)) {
        posOfExtreme = j;
        break;
      }
    }
    assert(posOfExtreme != -1);
    if (a < b) {
      for (int j = 0; j <= posOfExtreme; j++) {
        cur.push_back(pt(prv[j].x + a, prv[j].y));
      }
      cur.push_back(pt(prv[posOfExtreme].x + a, 0));
      cur.push_back(pt(prv[posOfExtreme].x + b, 0));
      for (int j = posOfExtreme, r = (int)prv.size(); j < r; j++) {
        cur.push_back(pt(prv[j].x + b, prv[j].y));
      }
    } else {
      for (int j = 0, r = (int)prv.size(); j < r; j++) {
        cur.push_back(pt(prv[j].x + a, prv[j].y));
      }
    }
    if (cur.size() >= 2 && eq(cur[0].x, cur[1].x)) cur.erase(cur.begin());
    while (cur.size() >= 2 && cur[(int)cur.size() - 2].x + EPS > q)
      cur.pop_back();
    if (cur.back().x > q + EPS) {
      cur.back() = pt(q, getOnLine(cur[(int)cur.size() - 2], cur.back(), q));
    }
    for (auto& z : cur) {
      z.y += 2 * (z.x - was[i]);
    }
    for (int j = 0, r = (int)cur.size(); j + 1 < r; j++) {
      if (cur[j].y + EPS < 0 && 0 < cur[j + 1].y - EPS) {
        pt tmp = pt(getOnLineX(cur[j], cur[j + 1], 0), 0);
        cur.insert(cur.begin() + j + 1, tmp);
        break;
      }
    }
    bool wasAssigned = false;
    for (int j = 0, r = (int)cur.size(); j < r; j++) {
      if (eq(cur[j].y, 0)) {
        extreme[i].x = cur[j].x;
        wasAssigned = true;
        break;
      }
    }
    if (!wasAssigned) {
      if (cur.size() == 1) {
        extreme[i].x = cur[0].x;
      } else {
        if (cur[0].y > EPS)
          extreme[i].x = cur[0].x;
        else
          extreme[i].x = cur.back().x;
      }
    }
    prv.clear();
    prv.shrink_to_fit();
  }
  int i = n;
  double x = extreme[i].x;
  while (true) {
    nw[i] = x;
    if (i == 1) break;
    if (extreme[i - 1].x + a <= x + EPS && x - EPS <= extreme[i - 1].x + b) {
      x = extreme[i - 1].x;
    } else if (x < extreme[i - 1].x + a + EPS) {
      x -= a;
    } else {
      x -= b;
    }
    i--;
  }
  double sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += (nw[i] - was[i]) * (nw[i] - was[i]);
    printf("%.20f ", nw[i]);
  }
  printf("\n%.20f\n", sum);
}