#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1, ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
const long long N = 1 << 19;
const double pi = acos(-1.0);
complex<double> a[N], b[N];
long long ans[N], n, X, sum[N], ton[N], lim, L, rev[N];
inline void init() {
  n = read();
  X = read();
  ton[0]++;
  for (long long i = 1; i <= n; i++) {
    sum[i] = sum[i - 1] + (read() < X);
    ton[sum[i]]++;
  }
}
inline void FFT(complex<double> *A, long long opt) {
  for (long long i = 0; i < lim; i++)
    if (rev[i] > i) swap(A[i], A[rev[i]]);
  for (long long s = 1; s < lim; s <<= 1) {
    complex<double> Wn(cos(pi / s), opt * sin(pi / s));
    for (long long i = 0; i < lim; i += (s << 1)) {
      complex<double> w(1, 0);
      for (long long j = 0; j < s; j++, w = w * Wn) {
        complex<double> x = A[i + j], y = A[i + j + s] * w;
        A[i + j] = x + y;
        A[i + j + s] = x - y;
      }
    }
  }
  if (opt == -1)
    for (long long i = 0; i < lim; i++) A[i] /= lim;
}
inline void solve() {
  for (long long i = 0; i <= n; i++) a[i] = b[n - i] = ton[i];
  for (lim = 1; lim <= (n << 1); lim <<= 1, L++)
    ;
  for (long long i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (L - 1));
  FFT(a, 1);
  FFT(b, 1);
  for (long long i = 0; i < lim; i++) a[i] *= b[i];
  FFT(a, -1);
  ans[0] = (long long)((a[n].real() + 0.5) - n) / 2;
  for (long long i = 1; i <= n; i++)
    ans[i] = (long long)(a[n + i].real() + 0.5);
  for (long long i = 0; i <= n; i++) write(ans[i]), putchar(' ');
}
signed main() {
  init();
  solve();
  return 0;
}
