#include <bits/stdc++.h>
using namespace std;
const long double pi = 4.0 * atan(1.0);
long long P = 1 << 19;
long long K = 0;
struct base {
  double x, y;
  base() {
    x = 0;
    y = 0;
  }
  base(double a) {
    x = a;
    y = 0;
  }
  base(double a, double b) {
    x = a;
    y = b;
  }
  base conj() { return base(x, -y); }
  base operator=(const base &o) {
    x = o.x;
    y = o.y;
    return *this;
  }
  base operator+(const base &o) const { return base(x + o.x, y + o.y); }
  base operator-(const base &o) const { return base(x - o.x, y - o.y); }
  base operator*(const base &o) const {
    return base(x * o.x - y * o.y, y * o.x + x * o.y);
  }
  base operator*(const double num) const { return base(x * num, y * num); }
  base operator/(const double num) const { return base(x / num, y / num); }
};
long long rev[(1 << 19) + 3];
base fa[(1 << 19) + 3], fb[(1 << 19) + 3];
long long res[(1 << 19) + 3];
void pre() {
  long long res;
  for (long long i = 0; i < P; ++i) {
    res = 0;
    for (long long j = 0; j < K; ++j) {
      if ((i >> j) & 1) {
        res |= 1 << (K - j - 1);
      }
    }
    rev[i] = res;
  }
}
void fft(base a[], bool inv) {
  for (long long i = 0; i < P; ++i) {
    if (rev[i] > i) {
      swap(a[i], a[rev[i]]);
    }
  }
  for (long long size = 2; size <= P; size <<= 1) {
    long long m = size >> 1;
    base w(cos(2 * pi / size), sin(2 * pi / size) * (inv ? -1 : 1));
    for (long long i = 0; i < P; i += size) {
      base cur(1, 0);
      for (long long j = 0; j < m; ++j) {
        base v = a[i + j];
        base u = a[i + j + m] * cur;
        a[i + j] = v + u;
        a[i + j + m] = v - u;
        cur = cur * w;
      }
    }
  }
}
void multiply(base a[], base b[]) {
  pre();
  fft(a, false), fft(b, false);
  for (long long i = 0; i < P; ++i) {
    a[i] = a[i] * b[i];
  }
  fft(a, true);
  for (long long i = 0; i < P; ++i) {
    res[i] = (long long)((a[i].x) / P + 0.5);
  }
}
long long a[212345], st[212345], en[212345], ans[212345];
vector<long long> vec;
int main() {
  std::ios::sync_with_stdio(false);
  long long n, x;
  cin >> n >> x;
  long long i;
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  vec.push_back(-1);
  for (i = 0; i < n; i++) {
    if (a[i] < x) vec.push_back(i);
  }
  vec.push_back(n);
  long long tot = vec.size();
  tot -= 2;
  for (i = 1; i < vec.size() - 1; i++) {
    st[i - 1] = vec[i] - vec[i - 1];
    en[i - 1] = vec[i + 1] - vec[i];
  }
  long long elems;
  long long wowo = 0;
  for (i = 1; i < vec.size(); i++) {
    elems = vec[i] - vec[i - 1] - 1;
    wowo += elems * (elems + 1) / 2;
  }
  K = 0;
  while ((1 << K) < tot + 3) K++;
  K++;
  P = (1 << K);
  for (i = 0; i < tot; i++) {
    fa[i] = base(st[i], 0);
    fb[tot - i - 1] = base(en[i], 0);
  }
  multiply(fa, fb);
  for (i = 0; i < tot; i++) {
    ans[tot - i] = res[i];
  }
  ans[0] = wowo;
  for (i = 0; i < n + 1; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
