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;
void getint(int &v) {
  char ch, fu = 0;
  for (ch = '*'; (ch < '0' || ch > '9') && ch != '-'; ch = getchar())
    ;
  if (ch == '-') fu = 1, ch = getchar();
  for (v = 0; ch >= '0' && ch <= '9'; ch = getchar()) v = v * 10 + ch - '0';
  if (fu) v = -v;
}
struct node {
  long double l, r, mn, mx;
  node() { l = r = mn = mx = 0.0; }
  node(long double L, long double R, long double MN, long double MX) {
    l = L;
    r = R;
    mn = MN;
    mx = MX;
  }
};
struct LAS {
  long double l, r, k, b;
  LAS() {}
  LAS(long double L, long double R, long double K, long double B) {
    l = L;
    r = R;
    k = K;
    b = B;
  }
};
int n, q, A, B, a[500010], ts;
long double ans, ANS, P[500010];
node tmp[500010];
vector<LAS> las[100010];
void pr(int n, long double now) {
  P[n] = now;
  if (n > 1) {
    long double too;
    for (int i = 0; i <= ((int)las[n].size()) - 1; ++i) {
      LAS t = las[n][i];
      if (t.l <= now && now <= t.r) {
        too = now * t.k + t.b;
        break;
      }
    }
    pr(n - 1, too);
  }
  printf("%.10f ", (double)(now + 1.0 * (n - 1) * A + 1.0));
}
int main() {
  cin >> n >> q >> A >> B;
  B -= A;
  q -= (n - 1) * A + 1;
  for (int i = 1; i <= n; ++i) getint(a[i]), a[i] -= (i - 1) * A + 1;
  B = min(B, q);
  tmp[ts = 1] = node(0.0, 1.0 * q, 0, 0);
  for (int i = 1; i <= n; ++i) {
    if (tmp[1].mn >= 0) {
      las[i].push_back(LAS(0.0, 1.0 * B, 0, 0));
      las[i].push_back(LAS(1.0 * B, q, 1, -B));
      for (int j = ts + 1; j >= 2; --j)
        tmp[j] = tmp[j - 1], tmp[j].l += B, tmp[j].r += B;
      tmp[1].l = 0, tmp[1].r = B;
      tmp[1].mn = 0.0, tmp[1].mx = 0.0;
      ++ts;
      while (tmp[ts].l > q) --ts;
      int j = ts;
      long double L = tmp[j].l;
      long double k = (tmp[j].mx - tmp[j].mn) / (tmp[j].r - tmp[j].l);
      long double R = q;
      long double MN = tmp[j].mn;
      long double MX = tmp[j].mn + (R - L) * k;
      tmp[j] = node(L, R, MN, MX);
    } else if (tmp[1].mn < 0 && tmp[ts].mx > 0) {
      int w = 0;
      for (int j = 1; j <= ts; ++j) {
        if (tmp[j].mn <= 0.0 && tmp[j].mx >= 0.0) {
          w = j;
          break;
        }
      }
      if (!w) {
        for (int j = 1; j <= ts; ++j)
          if (tmp[j].mx < 0) w = j;
        las[i].push_back(LAS(0.0, tmp[w].r, 1, 0));
        las[i].push_back(LAS(tmp[w].r, tmp[w].r + B, 0, tmp[w].r));
        las[i].push_back(LAS(tmp[w].r + B, 1.0 * q, 1, -B));
        for (int j = ts + 1; j >= w + 2; --j)
          tmp[j] = tmp[j - 1], tmp[j].l += B, tmp[j].r += B;
        tmp[w + 1].l = tmp[w].r;
        tmp[w + 1].r = tmp[w].r + B;
        tmp[w + 1].mn = 0.0;
        tmp[w + 1].mx = 0.0;
        ++ts;
        while (tmp[ts].l > q) --ts;
        int j = ts;
        long double L = tmp[j].l;
        long double k = (tmp[j].mx - tmp[j].mn) / (tmp[j].r - tmp[j].l);
        long double R = q;
        long double MN = tmp[j].mn;
        long double MX = tmp[j].mn + (R - L) * k;
        tmp[j] = node(L, R, MN, MX);
      } else if (tmp[w].mx - tmp[w].mn < 1e-10) {
        las[i].push_back(LAS(0.0, tmp[w].l, 1, 0));
        las[i].push_back(LAS(tmp[w].l, tmp[w].l + B, 0, tmp[w].l));
        las[i].push_back(LAS(tmp[w].l + B, q, 1, -B));
        tmp[w].r += B;
        for (int j = w + 1; j <= ts; ++j) tmp[j].l += B, tmp[j].r += B;
        while (tmp[ts].l > q) --ts;
        int j = ts;
        long double L = tmp[j].l;
        long double k = (tmp[j].mx - tmp[j].mn) / (tmp[j].r - tmp[j].l);
        long double R = q;
        long double MN = tmp[j].mn;
        long double MX = tmp[j].mn + (R - L) * k;
        tmp[j] = node(L, R, MN, MX);
      } else {
        long double k = (tmp[w].mx - tmp[w].mn) / (tmp[w].r - tmp[w].l);
        long double t = tmp[w].l - tmp[w].mn / k;
        las[i].push_back(LAS(0.0, t, 1, 0));
        las[i].push_back(LAS(t, t + B, 0, t));
        las[i].push_back(LAS(t + B, q, 1, -B));
        for (int j = ts + 2; j >= w + 2; --j)
          tmp[j] = tmp[j - 2], tmp[j].l += B, tmp[j].r += B;
        tmp[w + 2].l = t + B;
        tmp[w + 2].mn = 0.0;
        tmp[w].r = t;
        tmp[w].mx = 0.0;
        tmp[w + 1].l = t;
        tmp[w + 1].r = t + B;
        tmp[w + 1].mn = 0.0;
        tmp[w + 1].mx = 0.0;
        ts += 2;
        while (tmp[ts].l > q) --ts;
        int j = ts;
        long double L = tmp[j].l;
        k = (tmp[j].mx - tmp[j].mn) / (tmp[j].r - tmp[j].l);
        long double R = q;
        long double MN = tmp[j].mn;
        long double MX = tmp[j].mn + (R - L) * k;
        tmp[j] = node(L, R, MN, MX);
      }
    } else {
      las[i].push_back(LAS(0.0, 1.0 * q, 1, 0));
    }
    for (int j = 1; j <= ts; ++j) {
      tmp[j].mn += tmp[j].l * 2 - a[i] * 2;
      tmp[j].mx += tmp[j].r * 2 - a[i] * 2;
    }
  }
  for (int i = 1; i <= n; ++i) ans += 1.0 * a[i] * a[i];
  ANS = 0.0;
  for (int j = 1; j <= ts; ++j) {
    if (tmp[j].mn >= 0) break;
    if (tmp[j].mx <= 0) {
      ans += 0.5 * (tmp[j].mx + tmp[j].mn) * (tmp[j].r - tmp[j].l);
      ANS = tmp[j].r;
    } else {
      long double L = tmp[j].l;
      long double k = (tmp[j].mx - tmp[j].mn) / (tmp[j].r - tmp[j].l);
      long double R = L - tmp[j].mn / k;
      ANS = R;
      long double MN = tmp[j].mn;
      long double MX = tmp[j].mn + (R - L) * k;
      ans += 0.5 * (MX + MN) * (R - L);
      break;
    }
  }
  pr(n, ANS);
  puts("");
  ans = 0.0;
  for (int i = 1; i <= n; ++i) ans += (a[i] - P[i]) * (a[i] - P[i]);
  printf("%.10f\n", (double)ans);
  return 0;
}