#include <bits/stdc++.h>
using namespace std;
const long long e = 8e5 + 100;
const long double pi = acos(-1.0);
long long n, x;
long long h[e], sum[e];
struct cp {
  long double x, y;
  cp() { x = y = 0; }
  cp(long double xx, long double yy) {
    x = xx;
    y = yy;
  }
  cp operator+(cp a) const { return cp(x + a.x, y + a.y); }
  cp operator-(cp a) const { return cp(x - a.x, y - a.y); }
  cp operator*(cp a) const { return cp(x * a.x - y * a.y, x * a.y + y * a.x); }
} a[e * 2], b[e * 2];
long long tr[e * 2];
void fft(long long len, cp a[], long long f) {
  for (long long i = 0; i < len; i++) {
    if (i < tr[i]) swap(a[i], a[tr[i]]);
  }
  for (long long p = 2; p <= len; p <<= 1) {
    long long lem = p / 2;
    cp w = cp(cos(pi * 2 / p), sin(pi * 2 / p) * f);
    for (long long k = 0; k < len; k += p) {
      cp buf;
      buf = cp(1, 0);
      for (long long l = k; l < k + lem; l++) {
        cp tt = buf * a[l + lem];
        a[l + lem] = a[l] - tt;
        a[l] = a[l] + tt;
        buf = buf * w;
      }
    }
  }
}
long long ans[e];
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> x;
  for (long long i = 1; i <= n; i++) cin >> h[i];
  for (long long i = 1; i <= n; i++)
    if (h[i] < x)
      h[i] = 1;
    else
      h[i] = 0;
  for (long long i = 1; i <= n; i++) sum[i] = sum[i - 1] + h[i];
  for (long long i = 0; i <= n; i++) {
    a[sum[i]].x += 1;
  }
  for (long long i = 0; i <= n; i++) {
    b[n - i] = a[i];
  }
  long long maxn = 1;
  while (maxn <= n * 2) maxn *= 2;
  for (long long i = 0; i <= maxn; i++) {
    tr[i] = ((tr[i >> 1] >> 1) | ((i & 1) * maxn >> 1));
  }
  fft(maxn, a, 1);
  fft(maxn, b, 1);
  for (long long i = 0; i < maxn; i++) a[i] = a[i] * b[i];
  fft(maxn, a, -1);
  for (long long i = 0; i <= n; i++)
    ans[i] = (long long)(a[i].x / (long double)maxn + 0.49);
  ans[n] = 0;
  long long las = 0;
  for (long long i = 1; i <= n; i++) {
    if (sum[i] != sum[las]) {
      las = i;
      continue;
    }
    ans[n] += i - las;
  }
  for (long long i = n; i >= 0; i--) {
    cout << ans[i] << " ";
  }
  return 0;
}
