#include <bits/stdc++.h>
using namespace std;
const long long iinf = 1 << 29;
const long long inf = 1ll << 60;
const long long mod = 1e9 + 7;
void GG() {
  cout << "No\n";
  exit(0);
}
long long mpow(long long a, long long n) {
  long long re = 1;
  while (n > 0) {
    if (n & 1) re = re * a % mod;
    a = a * a % mod;
    n >>= 1;
  }
  return re;
}
long long inv(long long b) {
  if (b == 1) return b;
  return (mod - mod / b) * inv(mod % b) % mod;
}
const long long maxn = 5e6 + 1;
const double PI = acos(-1.0);
void FFT(vector<complex<double> > &a, bool rev = 0) {
  long long n = (long long)a.size();
  assert(__builtin_popcount(n) <= 1);
  for (long long i = 1, j = 0; i < n; i++) {
    long long bit = n / 2;
    while (j >= bit) j -= bit, bit /= 2;
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (long long B = 2; B <= n; B *= 2) {
    double ang = 2 * PI / B * (rev ? -1 : 1);
    complex<double> w0(cos(ang), sin(ang));
    for (long long i = 0; i < n; i += B) {
      complex<double> w(1, 0);
      for (long long j = 0; j < B / 2; j++) {
        complex<double> u = a[i + j], v = w * a[i + j + B / 2];
        a[i + j] = u + v, a[i + j + B / 2] = u - v;
        w *= w0;
      }
    }
  }
  if (rev)
    for (long long i = 0; i < (n); i++) a[i] /= n;
}
vector<long long> mul(vector<long long> a, vector<long long> b) {
  long long n = 1;
  while (n < (long long)a.size() + (long long)b.size()) n *= 2;
  vector<complex<double> > x(n), y(n);
  for (long long i = 0; i < ((long long)a.size()); i++)
    x[i] = complex<double>(a[i], 0);
  for (long long j = 0; j < ((long long)b.size()); j++)
    y[j] = complex<double>(b[j], 0);
  FFT(x);
  FFT(y);
  for (long long i = 0; i < (n); i++) x[i] *= y[i];
  FFT(x, 1);
  vector<long long> re(n);
  for (long long i = 0; i < (n); i++) re[i] = (long long)(round(x[i].real()));
  while (re.size() > 1 && re.back() == 0) re.pop_back();
  return re;
}
signed main() {
  long long n, x;
  cin >> n >> x;
  vector<long long> a(n);
  vector<long long> b;
  long long cnt = 1;
  long long zed = 0;
  for (long long i = 0; i < (n); i++) {
    cin >> a[i];
    if (a[i] < x) {
      b.push_back(cnt);
      cnt = 0;
    }
    cnt++;
  }
  b.push_back(cnt);
  for (long long y : b) zed += (y - 1) * (y) / 2;
  vector<long long> c = b;
  reverse(c.begin(), c.end());
  vector<long long> d = mul(b, c);
  cout << zed << ' ';
  for (long long i = ((long long)b.size()); i < ((long long)b.size() + n);
       i++) {
    if (i < (long long)d.size())
      cout << d[i] << ' ';
    else
      cout << 0 << ' ';
  }
}
