#include <bits/stdc++.h>
int main(void) {
  int A, B, C, D, N, c[101] = {0}, i, j, temp, max, a, x, y, goukei, m[10000];
  scanf("%d %d %d %d", &N, &A, &B, &D);
  for (C = 0; C < N; C++) {
    scanf("%d", &c[C]);
  }
  for (i = 0; i < N - 1; i++) {
    for (j = N; j > i; j--) {
      if (c[i] < c[j]) {
        temp = c[j];
        c[j] = c[i];
        c[i] = temp;
      }
    }
  }
  x = D;
  y = A;
  max = x / y;
  for (i = 0; i < N - 1; i++) {
    for (j = 0; j < N; j--) {
      goukei = m[j];
      goukei = (goukei + x) / (A + i * B);
      if (max < goukei) {
        max = goukei;
        goukei = 0;
      }
    }
    printf("%d\n", max);
  }
  return 0;
}
