## https://yukicoder.me/problems/no/3049 def main(): N, T, X, Y = map(int , input().split()) D = list(map(int, input().split())) D.sort() arrays = [] for d in D: if len(arrays) == 0: arrays.append([d]) else: if d - arrays[-1][-1] > T: arrays.append([d]) else: arrays[-1].append(d) weight = min(X, Y) count_arrray = [len(ar) for ar in arrays] count_arrray.sort(reverse=True) answer = [0] * N index = 0 cnt = 0 w = 0 for array in count_arrray: cnt += array while index < cnt: answer[index] = w index += 1 w += weight print(" ".join(map(str, answer))) if __name__ == '__main__': main()