#include <bits/stdc++.h>
using namespace std;
const int lim = (1 << 19);
const int lg = 19;
const int nmax = lim + 5;
const long double PI = acos(-1.0);
struct cpx {
  long double re, im;
} A[nmax], B[nmax], C[nmax], put, root, U, V;
cpx operator*(cpx unu, cpx doi) {
  return {unu.re * doi.re - unu.im * doi.im, unu.re * doi.im + unu.im * doi.re};
}
cpx operator+(cpx unu, cpx doi) { return {unu.re + doi.re, unu.im + doi.im}; }
cpx operator-(cpx unu, cpx doi) { return {unu.re - doi.re, unu.im - doi.im}; }
int O[nmax], v[nmax];
int i, l, j, n, x;
long long pref[nmax], suf[nmax], part[nmax], ans[nmax];
int pp, ss;
long double L;
void fft(cpx v[], long double rev) {
  for (i = 0; i < lim; i++)
    if (i < O[i]) swap(v[i], v[O[i]]);
  for (l = 1; l < lim; l *= 2) {
    L = 2 * l;
    root = {cos(2 * PI / L), rev * sin(2 * PI / L)};
    for (i = 0; i < lim; i += 2 * l) {
      put = {1, 0};
      for (j = 0; j < l; j++) {
        U = v[i + j];
        V = v[i + j + l] * put;
        v[i + j] = U + V;
        v[i + j + l] = U - V;
        put = put * root;
      }
    }
  }
  if (rev == -1) {
    L = lim;
    for (i = 0; i < lim; i++) v[i].re /= L, v[i].im /= L;
  }
}
void convolution(long long a[], long long b[], long long c[]) {
  for (i = 0; i < lim; i++) A[i].re = a[i];
  for (i = 0; i < lim; i++) B[i].re = b[i];
  fft(A, 1);
  fft(B, 1);
  for (i = 0; i < lim; i++) C[i] = A[i] * B[i];
  fft(C, -1);
  for (i = 0; i < lim; i++) c[i] = (long long)(C[i].re + 0.5);
}
long long solve0() {
  long long ret = 0, secv = 0;
  for (i = 1; i <= n; i++) {
    secv = (secv + 1) * (v[i] >= x);
    ret += secv;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> x;
  for (i = 1; i <= n; i++) cin >> v[i];
  for (i = 1; i <= n; i++) {
    pp += (v[i] < x);
    pref[pp]++;
  }
  for (i = n; i >= 1; i--) {
    ss += (v[i] < x);
    suf[ss]++;
  }
  pref[0]++, suf[0]++;
  int tot = pp;
  for (i = 0; i < lim; i++)
    for (j = 0; j < lg; j++)
      if (((1 << j) & i)) O[i] |= (1 << (lg - j - 1));
  convolution(suf, pref, part);
  for (i = 0; i <= tot; i++) {
    ans[tot - i] = part[i];
  }
  ans[0] = solve0();
  for (i = 0; i <= n; i++) cout << ans[i] << ' ';
  return 0;
}
