from collections import deque, defaultdict, Counter from bisect import bisect_left, bisect_right from itertools import permutations, combinations from heapq import heappop, heappush import math, sys # input = sys.stdin.readline _int = lambda x: int(x)-1 MOD = 998244353 #10**9+7 INF = 1<<60 Yes, No = "Yes", "No" N, T, X, Y = map(int, input().split()) D = list(map(int, input().split())) D.sort() cnt = 1 li = [] for i in range(N-1): if D[i+1]-D[i] > T: li.append(cnt) cnt = 1 else: cnt += 1 li.append(cnt) li.sort() cnt = li.pop() cost = 0 ans = [] for i in range(1, N+1): if cnt < i: cnt += li.pop() cost += min(X, Y) ans.append(cost) print(*ans)