#include <bits/stdc++.h>
using namespace std;
using ld = long double;
using ll = long long;
using ull = unsigned long long;
const ll mod = 1004535809, mod_g = 3;
const int N = int(1e5 + 10);
template <typename T>
inline T read() {
  T x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
template <typename T>
inline T print(T x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
const ld pi = acos(-1.0);
struct Complex {
  ld r, i;
  Complex(ld _r = 0, ld _i = 0) : r(_r), i(_i) {}
  Complex operator+(const Complex &b) const {
    return Complex(r + b.r, i + b.i);
  }
  Complex operator-(const Complex &b) const {
    return Complex(r - b.r, i - b.i);
  }
  Complex operator*(const Complex &b) const {
    return Complex(r * b.r - i * b.i, r * b.i + i * b.r);
  }
  Complex operator/(const Complex &b) const {
    return Complex((r * b.r + i * b.i) / (b.r * b.r + b.i * b.i),
                   (i * b.r - r * b.i) / (b.r * b.r + b.i * b.i));
  }
};
int R[int(1e6 + 10000)];
Complex x[int(1e6 + 10000)], y[int(1e6 + 10000)];
void get_R(int lim) {
  for (int i = 0; i < lim; i++) {
    R[i] = (i & 1) * (lim >> 1) + (R[i >> 1] >> 1);
  }
}
void FFT(Complex *f, int lim, int rev) {
  for (int i = 0; i < lim; i++) {
    if (i < R[i]) swap(f[i], f[R[i]]);
  }
  for (int mid = 1; mid < lim; mid <<= 1) {
    Complex wn = Complex(cos(pi / mid), rev * sin(pi / mid));
    for (int len = mid << 1, cur = 0; cur < lim; cur += len) {
      Complex w = Complex(1, 0);
      for (int k = 0; k < mid; k++, w = w * wn) {
        Complex x = f[cur + k], y = w * f[cur + mid + k];
        f[cur + k] = x + y, f[cur + mid + k] = x - y;
      }
    }
  }
  if (rev == -1) {
    for (int i = 0; i < lim; i++) {
      f[i].r /= lim;
    }
  }
}
ll quick_pow(ll ans, ll p, ll res = 1) {
  for (; p; p >>= 1, ans = ans * ans % mod)
    if (p & 1) res = res * ans % mod;
  return res % mod;
}
ll ans[200010];
inline void solve() {
  int n, X;
  cin >> n >> X;
  for (int i = 1; i <= n; ++i) {
    int xx;
    cin >> xx;
    ans[i] = ans[i - 1] + (xx < X);
    x[ans[i]].r++;
    y[200000 - ans[i]].r++;
    x[i].i = y[i].i = 0;
  }
  x[0].r++, y[200000].r++;
  int lim = 1;
  while (lim <= 400000) lim <<= 1;
  get_R(lim);
  FFT(x, lim, 1);
  FFT(y, lim, 1);
  for (int i = 0; i <= lim - 1; ++i) x[i] = x[i] * y[i];
  FFT(x, lim, -1);
  cout << (ll(x[200000].r + 0.5) - n - 1) / 2;
  for (int i = 1; i <= n; ++i) cout << ' ' << ll(x[200000 + i].r + 0.5);
  cout << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
