#include <bits/stdc++.h>
using namespace std;
const int maxn = 2 * 1e5 + 17;
long long inz;
int mx, N, X;
int arr[maxn], cum[maxn], total[maxn];
void FFT(vector<complex<double> > &p, bool inv) {
  long double PI = acos(-1);
  int n = p.size();
  for (int i = 1, j = 0; i < n; i++) {
    int bit = n >> 1;
    for (; j >= bit; bit >>= 1) j -= bit;
    j += bit;
    if (i < j) swap(p[i], p[j]);
  }
  for (int len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (inv ? 1 : -1);
    complex<double> wn(cos(ang), sin(ang));
    for (int i = 0; i < n; i += len) {
      complex<double> w(1);
      for (int j = 0; j < len / 2; j++) {
        complex<double> x = p[i + j], y = p[i + j + len / 2] * w;
        p[i + j] = x + y;
        p[i + j + len / 2] = x - y;
        w *= wn;
      }
    }
  }
  if (inv)
    for (int i = 0; i < n; i++) p[i] /= n;
}
vector<long long> mult(vector<long long> &p, vector<long long> &q) {
  int n = 1;
  while (n < max(p.size(), q.size())) n <<= 1;
  n <<= 1;
  vector<complex<double> > fp(p.begin(), p.end()), fq(q.begin(), q.end());
  fp.resize(n);
  fq.resize(n);
  FFT(fp, false);
  FFT(fq, false);
  for (int i = 0; i < n; i++) fp[i] *= fq[i];
  FFT(fp, true);
  vector<long long> r(n);
  for (int i = 0; i < n; i++) r[i] = fp[i].real() + 0.5;
  return r;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> N >> X;
  for (int i = 1; i <= N; i++)
    cin >> arr[i], cum[i] = cum[i - 1] + (arr[i] < X);
  for (int i = 0; i <= N; i++) total[cum[i]]++;
  for (int i = 1; i <= N; i++) {
    if (arr[i] < X) continue;
    int j;
    for (j = i; j <= N && arr[j] >= X; j++)
      ;
    inz += 1LL * (j - i + 1) * (j - i) >> 1;
    i = --j;
  }
  mx = N + 1;
  vector<long long> p(mx), q(mx);
  for (int i = 0; i < mx; i++) p[i] = total[i], q[i] = total[mx - 1 - i];
  vector<long long> pq = mult(p, q);
  printf("%lld ", inz);
  for (int i = 0; i < N; i++) printf("%lld ", pq[mx + i]);
  return !printf("\n");
  for (int i = mx; i < pq.size(); i++) cout << pq[i] << " ";
  cout << endl;
  for (int i = 0; i < mx; i++) cout << p[i] << " ";
  cout << endl;
  for (int i = 0; i < mx; i++) cout << q[i] << " ";
  cout << endl;
  for (int i = 0; i <= N; i++) cout << cum[i] << " ";
  cout << endl;
  for (int i = 0; i <= N; i++) cout << total[i] << " ";
  cout << endl;
  return 0;
}
