#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7, MAXN = 1e6 + 10;
const long double Pi = 3.141592653589793238462643383279;
struct COM {
  long double real, imag;
  COM() { real = imag = 0; }
  COM(long double x, long double y) {
    real = x;
    imag = y;
  }
  friend COM operator+(COM x, COM y) {
    return COM(x.real + y.real, x.imag + y.imag);
  }
  friend COM operator-(COM x, COM y) {
    return COM(x.real - y.real, x.imag - y.imag);
  }
  friend COM operator*(COM x, COM y) {
    return COM(x.real * y.real - x.imag * y.imag,
               x.real * y.imag + x.imag * y.real);
  }
} f[MAXN], g[MAXN];
int N, X, limit = 1, lg, rev[MAXN];
inline void FFT(COM *a, int type) {
  for (int i = 0; i < limit; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int half = 1; half < limit; half <<= 1) {
    int len = half << 1;
    COM Wn = COM(cos(Pi / half), sin(Pi / half) * type);
    for (int j = 0; j < limit; j += len) {
      COM w = COM(1, 0), x, y;
      for (int k = 0; k < half; k++) {
        x = a[j + k], y = a[j + k + half] * w;
        a[j + k] = x + y;
        a[j + k + half] = x - y;
        w = w * Wn;
      }
    }
  }
  if (type == -1)
    for (int i = 0; i < limit; i++) a[i].real /= (double)limit;
}
long long s[MAXN], ans[MAXN];
char ch;
int main() {
  scanf("%d%d", &N, &X);
  for (int i = 1; i <= N; i++) {
    scanf("%lld", s + i);
    s[i] = (s[i] < X) + s[i - 1];
  }
  for (int i = 0; i < N; i++) {
    f[s[i]].real++;
    g[s[N] - s[i + 1]].real++;
  }
  while (limit <= (s[N] << 1)) {
    limit <<= 1;
    lg++;
  }
  for (int i = 0; i < limit; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (lg - 1));
  FFT(f, 1);
  FFT(g, 1);
  for (int i = 0; i < limit; i++) f[i] = f[i] * g[i];
  FFT(f, -1);
  long long cnt = 0;
  for (int i = 1; i <= N; i++)
    if (s[i] == s[i - 1])
      cnt++;
    else {
      ans[0] += cnt * (cnt - 1) / 2 + cnt;
      cnt = 0;
    }
  ans[0] += cnt * (cnt - 1) / 2 + cnt;
  for (int i = 0; i < s[N]; i++) ans[s[N] - i] = f[i].real + 1e-2;
  for (int i = 0; i <= N; i++) printf("%lld ", ans[i]);
  return 0;
}
