#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1);
long long n, x, ch;
long long pre = 0;
long long c[400005];
long long d[200005];
long long _d[200005];
struct Complex {
  double r, i;
  Complex(double _r = 0, double _i = 0) : r(_r), i(_i) {}
  Complex operator+(const Complex &b) { return Complex(r + b.r, i + b.i); }
  Complex operator-(const Complex &b) { return Complex(r - b.r, i - b.i); }
  Complex operator*(const Complex &b) {
    return Complex(r * b.r - i * b.i, r * b.i + i * b.r);
  }
} xd[800005], _xd[800005];
void change(Complex y[], long long n) {
  long long i, j, k;
  for (i = 1, j = n / 2; i < n - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    k = n / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    if (j < k) j += k;
  }
}
void fft(Complex y[], long long n, long long on) {
  change(y, n);
  for (long long h = 2; h <= n; h <<= 1) {
    Complex wn(cos(-on * 2 * PI / h), sin(-on * 2 * PI / h));
    for (long long j = 0; j < n; j += h) {
      Complex w(1, 0);
      for (long long k = j; k < j + h / 2; k++) {
        Complex u = y[k];
        Complex t = w * y[k + h / 2];
        y[k] = u + t;
        y[k + h / 2] = u - t;
        w = w * wn;
      }
    }
  }
  if (on == -1)
    for (long long i = 0; i < n; i++) y[i].r /= n;
}
int main() {
  scanf("%lld%lld", &n, &x);
  d[pre]++;
  for (long long i = 1; i <= n; i++) {
    scanf("%lld", &ch);
    if (ch < x) pre++;
    d[pre]++;
  }
  long long m = n;
  n = pre + 1;
  long long cnt = 0;
  for (long long i = 0; i < n; i++) {
    cnt += (d[i] * (d[i] - 1) / 2);
  }
  printf("%lld ", cnt);
  for (long long i = 0; i < n; i++) _d[i] = d[n - i - 1];
  long long len = 1;
  while (len < (2 * n)) len <<= 1;
  for (long long i = 0; i < n; i++) {
    xd[i] = Complex(d[i], 0);
    _xd[i] = Complex(_d[i], 0);
  }
  for (long long i = n; i < len; i++) {
    xd[i] = _xd[i] = Complex(0, 0);
  }
  fft(xd, len, 1);
  fft(_xd, len, 1);
  for (long long i = 0; i < len; i++) xd[i] = xd[i] * _xd[i];
  fft(xd, len, -1);
  len = n * 2;
  for (long long i = 0; i < len; i++) c[i] = (long long)(xd[i].r + 0.5);
  for (long long k = 1; k <= m; k++) {
    printf("%lld ", c[n + k - 1]);
  }
  putchar('\n');
}
