#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int n, x;
int a[N];
using cd = complex<double>;
const double PI = acos(-1);
long long ans[N];
long long reverse(long long num, long long lg_n) {
  long long res = 0;
  for (long long i = 0; i < lg_n; i++) {
    if (num & (1 << i)) res |= 1 << (lg_n - 1 - i);
  }
  return res;
}
void fft(vector<cd>& a, bool invert) {
  long long n = a.size();
  long long lg_n = 0;
  while ((1 << lg_n) < n) lg_n++;
  for (long long i = 0; i < n; i++) {
    if (i < reverse(i, lg_n)) swap(a[i], a[reverse(i, lg_n)]);
  }
  for (long long len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    cd wlen(cos(ang), sin(ang));
    for (long long i = 0; i < n; i += len) {
      cd w(1);
      for (long long j = 0; j < len / 2; j++) {
        cd u = a[i + j], v = a[i + j + len / 2] * w;
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
        w *= wlen;
      }
    }
  }
  if (invert) {
    for (cd& x : a) x /= n;
  }
}
vector<long long> multiply(vector<long long> const& a,
                           vector<long long> const& b) {
  vector<cd> fa(a.begin(), a.end()), fb(b.begin(), b.end());
  long long n = 1;
  while (n < a.size() + b.size()) n <<= 1;
  fa.resize(n);
  fb.resize(n);
  fft(fa, false);
  fft(fb, false);
  for (long long i = 0; i < n; i++) fa[i] *= fb[i];
  fft(fa, true);
  vector<long long> result(n);
  for (long long i = 0; i < n; i++) result[i] = round(fa[i].real());
  return result;
}
int main() {
  scanf("%d%d", &n, &x);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
    a[i] = (a[i] < x);
  }
  vector<long long> v;
  int cur = 0;
  for (int i = 0; i < n; i++) {
    if (a[i] == 1)
      v.push_back(cur + 1), ans[0] += cur * 1ll * (cur + 1) / 2, cur = 0;
    else
      cur++;
  }
  ans[0] += cur * 1ll * (cur + 1) / 2;
  v.push_back(cur + 1);
  auto v2 = v;
  reverse(v2.begin(), v2.end());
  auto res = multiply(v, v2);
  int nn = v.size();
  for (int i = 1; i < nn; i++) ans[i] = res[nn - i - 1];
  for (int i = 0; i <= n; i++) printf("%lld ", ans[i]);
}
