#include <bits/stdc++.h>
using namespace std;
const int maxn(1 << 19);
const double pi(acos(-1));
struct Complex {
  double a, b;
  inline Complex() { a = b = 0; }
  inline Complex(double _a, double _b) { a = _a, b = _b; }
  inline Complex operator+(Complex x) const {
    return Complex(a + x.a, b + x.b);
  }
  inline Complex operator-(Complex x) const {
    return Complex(a - x.a, b - x.b);
  }
  inline Complex operator*(Complex x) const {
    return Complex(a * x.a - b * x.b, a * x.b + b * x.a);
  }
  inline Complex Conj() { return Complex(a, -b); }
};
Complex a[maxn], b[maxn], w[maxn];
int r[maxn], l, deg, g[maxn], h[maxn];
long long ans[maxn];
inline void FFT(Complex *p, int opt) {
  register int i, j, k, t;
  register Complex wn, x, y;
  for (i = 0; i < deg; ++i)
    if (r[i] < i) swap(p[r[i]], p[i]);
  for (i = 1; i < deg; i <<= 1)
    for (t = i << 1, j = 0; j < deg; j += t)
      for (k = 0; k < i; ++k) {
        wn = w[deg / i * k];
        if (opt == -1) wn.b *= -1;
        x = p[j + k], y = wn * p[i + j + k];
        p[j + k] = x + y, p[i + j + k] = x - y;
      }
}
inline void Init(int n) {
  register int i;
  for (deg = 1, l = 0; deg < n; deg <<= 1) ++l;
  for (i = 0; i < deg; ++i) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
  for (i = 0; i < deg; ++i)
    w[i] = Complex(cos(pi * i / deg), sin(pi * i / deg));
}
inline void Mul(int *p, int *q, long long *f) {
  register int i, k;
  register Complex ca, da, db;
  for (i = 0; i < deg; ++i) a[i] = Complex(p[i], q[i]);
  for (FFT(a, 1), i = 0; i < deg; ++i) {
    k = (deg - i) & (deg - 1), ca = a[k].Conj();
    b[i] = (ca + a[i]) * (a[i] - ca) * Complex(0, -0.25);
  }
  for (FFT(b, -1), i = 0; i < deg; ++i) f[i] = (long long)(b[i].a / deg + 0.5);
}
int n, s[maxn];
int main() {
  register int i, x, v;
  for (scanf("%d%d", &n, &x), i = 1; i <= n; ++i)
    scanf("%d", &v), s[i] = s[i - 1] + (v < x);
  for (Init(n + n + 1), i = 0; i <= n; ++i) ++g[s[i]], ++h[n - s[i]];
  for (Mul(g, h, ans), i = 0; i <= n; ++i) {
    if (!i)
      printf("%lld ", (ans[n] - n - 1) >> 1);
    else
      printf("%lld ", ans[i + n]);
  }
  return 0;
}
