#include <bits/stdc++.h>
using namespace std;
const int maxn = 1 << 19;
int n, x, s[maxn], a[maxn];
long long res[maxn], cnt[maxn];
vector<complex<double> > A(maxn + 5), B(maxn + 5);
complex<double> nxt[maxn + 5], W[maxn + 5];
void readf() {
  cin >> n >> x;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
  for (int i = (1); i <= (n); ++i) s[i] = s[i - 1] + (a[i] < x);
  for (int i = (0); i <= (n); ++i) cnt[s[i]]++;
}
int revbit(int nbit, int mask) {
  for (int i = 0, j = nbit - 1; i <= j; ++i, --j)
    if ((((mask) >> (i)) & 1) != (((mask) >> (j)) & 1)) {
      mask ^= 1 << i;
      mask ^= 1 << j;
    }
  return mask;
}
void FFT(int sz, vector<complex<double> > &u, bool inverse) {
  if (sz == 1) return;
  for (int i = 0; i < sz; ++i) {
    int j = revbit(19, i);
    if (i < j) swap(u[i], u[j]);
  }
  for (int step = 1; step < sz; step <<= 1) {
    double ang = acos(-1) / step;
    if (inverse) ang = -ang;
    complex<double> w(1), wn(cos(ang), sin(ang));
    for (int i = 0; i < step; ++i) {
      W[i] = w;
      w *= wn;
    }
    int even = 0;
    int odd = even + step;
    while (even < sz) {
      for (int i = 0; i < step; ++i) {
        nxt[even + i] = u[even + i] + W[i] * u[odd + i];
        nxt[even + i + step] = u[even + i] - W[i] * u[odd + i];
      }
      even += 2 * step;
      odd += 2 * step;
    }
    for (int i = 0; i < sz; ++i) u[i] = nxt[i];
  }
  if (inverse)
    for (int i = 0; i < maxn; ++i) u[i] /= sz;
}
void solve() {
  for (int i = (0); i <= (n); ++i) A[s[i]] += 1;
  for (int i = (0); i <= (n); ++i) B[n - s[i]] += 1;
  FFT(maxn, A, 0);
  FFT(maxn, B, 0);
  for (int i = 0; i < maxn; ++i) A[i] *= B[i];
  FFT(maxn, A, 1);
  long long ans = 0;
  for (int i = (0); i < (maxn); ++i) ans += (cnt[i] * (cnt[i] - 1)) / 2;
  cout << ans << ' ';
  for (int i = n + 1; i <= 2 * n; ++i) res[i - n] = round(A[i].real());
  for (int i = (1); i <= (n); ++i) cout << res[i] << ' ';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  readf();
  solve();
}
