#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
namespace fft {
using cd = complex<double>;
const double PI = acos(-1);
const int K = 20;
const int N = (1 << K);
cd w[N];
int rev[N];
bool precalced;
void precalc() {
  for (int i = 0; i < N; i++) {
    double phi = 2 * PI * i / N;
    w[i] = cd(cos(phi), sin(phi));
  }
  for (int i = 1; i < N; i++)
    rev[i] = (rev[i >> 1] >> 1) ^ ((i & 1) << (K - 1));
}
void fft(vector<cd> &a, bool inv) {
  if (!precalced) {
    precalc();
    precalced = true;
  }
  int n = int((a).size());
  int k = 0;
  while ((1 << k) < n) k++;
  for (int i = 0; i < n; i++) {
    int j = (rev[i] >> (K - k));
    if (i < j) swap(a[i], a[j]);
  }
  for (int lvl = 0; lvl < k; lvl++) {
    int len = (1 << lvl);
    for (int i = 0; i < n; i += 2 * len) {
      for (int j = 0; j < len; j++) {
        cd u = a[i + j];
        cd v = a[i + len + j] * w[j << (K - 1 - lvl)];
        a[i + j] = u + v;
        a[i + len + j] = u - v;
      }
    }
  }
  if (inv) {
    for (int i = 0; i < n; i++) a[i] /= n;
    reverse(a.begin() + 1, a.end());
  }
}
vector<ll> multiply(const vector<int> &a, const vector<int> &b) {
  int n = int((a).size()) + int((b).size()) - 1;
  int m = n;
  while (m & (m - 1)) m++;
  vector<cd> fa(m), fb(m);
  for (int i = 0; i < m; i++) {
    fa[i] = cd(i < int((a).size()) ? a[i] : 0, 0);
    fb[i] = cd(i < int((b).size()) ? b[i] : 0, 0);
  }
  fft(fa, 0);
  fft(fb, 0);
  for (int i = 0; i < m; i++) fa[i] *= fb[i];
  fft(fa, 1);
  vector<ll> res(n);
  for (int i = 0; i < n; i++) res[i] = ll(fa[i].real() + 0.5);
  return res;
}
};  // namespace fft
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, x;
  cin >> n >> x;
  vector<int> a(n + 1), b(n + 1);
  a[0] = 1;
  b[n] = 1;
  ll ans = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int val;
    cin >> val;
    cnt += (val < x);
    a[cnt]++;
    b[n - cnt]++;
    ans += (a[cnt] - 1);
  }
  auto c = fft::multiply(a, b);
  cout << ans << ' ';
  for (int i = 1; i <= n; i++) cout << c[n + i] << ' ';
  cout << endl;
}
