#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
const int N = 200005;
const double PI = acos(-1);
int i, n, x, y, pref[N];
vector<long long> a, b, c;
inline int getRev(int x, int lg) {
  int ans = 0;
  for (int i = 0; i < lg; ++i)
    if (x & (1 << i)) ans |= (1 << (lg - i - 1));
  return ans;
}
void fft(vector<complex<long double> > &a, bool inv) {
  int lg = 1, sz = a.size();
  while ((1 << lg) < sz) ++lg;
  for (int i = 0; i < sz; ++i)
    if (i < getRev(i, lg)) swap(a[i], a[getRev(i, lg)]);
  for (int len = 2; len <= sz; len <<= 1) {
    double ang = (inv ? -2 : 2) * PI / len;
    complex<long double> wlen(cos(ang), sin(ang));
    for (int i = 0; i < sz; i += len) {
      complex<long double> w(1, 0);
      for (int j = 0; j < len / 2; ++j) {
        complex<long double> u = a[i + j], v = w * a[i + len / 2 + j];
        a[i + j] = u + v;
        a[i + len / 2 + j] = u - v;
        w *= wlen;
      }
    }
  }
  if (inv)
    for (int i = 0; i < sz; ++i) a[i] /= sz;
}
void conv(vector<long long> &a, vector<long long> &b, vector<long long> &c) {
  vector<complex<long double> > na(a.begin(), a.end());
  vector<complex<long double> > nb(b.begin(), b.end());
  vector<complex<long double> > nc;
  int sz = 2 * max(a.size(), b.size()), lg = 1;
  while ((1 << lg) < sz) ++lg;
  sz = (1 << lg);
  na.resize(sz);
  nb.resize(sz);
  nc.resize(sz);
  fft(na, 0);
  fft(nb, 0);
  for (int i = 0; i < nc.size(); ++i) nc[i] = na[i] * nb[i];
  fft(nc, 1);
  c.resize(a.size() + b.size() - 1);
  for (int i = 0; i < c.size(); ++i) c[i] = nc[i].real() + 0.5;
}
int main() {
  scanf("%d %d", &n, &x);
  a.resize(n + 1);
  b.resize(n + 1);
  for (i = 1; i <= n; ++i) {
    scanf("%d", &y);
    pref[i] = pref[i - 1] + (y < x);
    ++a[pref[i]];
    ++b[n - pref[i]];
  }
  ++a[0];
  ++b[n];
  conv(a, b, c);
  for (i = 1; i <= n; ++i) c[i] = c[n + i];
  for (i = 1, c[0] = 0; i <= n; ++i) {
    if (pref[i] - pref[i - 1]) continue;
    int st = 0, dr = i, pz = i - 1;
    while (st <= dr) {
      int pivot = (st + dr) / 2;
      if (pref[pivot] == pref[i])
        pz = pivot, dr = pivot - 1;
      else
        st = pivot + 1;
    }
    c[0] += i - pz;
  }
  for (i = 0; i <= n; ++i) printf("%lld%c", c[i], " \n"[i == n]);
  return 0;
}
