#include long long int h[500005], l; long long int comp_h(long long int a, long long int b) { if (h[a] > h[b]) return 1; else return -1; } void swap_h(long long int a, long long int b) { long long int f = h[a]; h[a] = h[b]; h[b] = f; return; } void push(long long int ne) { h[l] = ne; long long int p = l; l++; for (; p > 0; p = (p - 1) / 2) if (comp_h((p - 1) / 2, p) > 0) swap_h((p - 1) / 2, p); return; } long long int pop() { l--; swap_h(0, l); long long int p = 0; for (;;) { if (2 * p + 2 < l) { if (comp_h(2 * p + 1, 2 * p + 2) > 0) { if (comp_h(p, 2 * p + 2) > 0) swap_h(p, 2 * p + 2); p = 2 * p + 2; } else { if (comp_h(p, 2 * p + 1) > 0) swap_h(p, 2 * p + 1); p = 2 * p + 1; } } else if (2 * p + 1 < l) { if (comp_h(p, 2 * p + 1) > 0) swap_h(p, 2 * p + 1); p = 2 * p + 1; } else break; } return h[l]; } long long int d[500005]; long long int cnt[500005]; int main() { long long int n, t, x, y; scanf("%lld %lld %lld %lld", &n, &t, &x, &y); long long int i, j; for (i = 0; i < n; i++) scanf("%lld", &d[i]); l = 0; for (i = 0; i < n; i++) push(d[i]); for (i = 0; i < n; i++) d[i] = pop(); long long int m = 1; cnt[0] = 1; for (i = 1; i < n; i++) { if (d[i] - d[i - 1] > t) { cnt[m] = 1; m++; } else cnt[m - 1]++; } l = 0; for (i = 0; i < m; i++) push(cnt[i]); for (i = 0; i < m; i++) cnt[m - i - 1] = pop(); for (i = 0; i < m - 1; i++) cnt[i + 1] += cnt[i]; long long int c = x; if (c > y) c = y; for (j = 0, i = 1; i <= n; i++) { if (cnt[j] < i) j++; printf("%lld", j * c); if (i < n ) printf(" "); else printf("\n"); } return 0; }