#include <bits/stdc++.h>
using namespace std;
const int MAXN = 600005;
const double PI = acos(-1.0);
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
int n, X, cnt[MAXN], len, rev[MAXN];
long long ans[MAXN];
struct Complex {
  double r, i;
  Complex() {}
  Complex(double _r, double _i) : r(_r), i(_i) {}
  friend Complex operator+(Complex a, Complex b) {
    return Complex(a.r + b.r, a.i + b.i);
  }
  friend Complex operator-(Complex a, Complex b) {
    return Complex(a.r - b.r, a.i - b.i);
  }
  friend Complex operator*(Complex a, Complex b) {
    return Complex(a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r);
  }
} A[MAXN], B[MAXN];
inline void FFT_init(int m) {
  int bit = -1;
  for (len = 1; len <= m; len <<= 1) ++bit;
  for (int i = 0; i < len; ++i) {
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << bit);
  }
}
void FFT(Complex *a, int type) {
  for (int i = 0; i < len; ++i) {
    if (i < rev[i]) {
      swap(a[i], a[rev[i]]);
    }
  }
  for (int i = 1; i < len; i <<= 1) {
    int p = (i << 1);
    Complex wn(cos(PI / i), sin(PI / i) * type);
    for (int j = 0; j < len; j += p) {
      Complex wnk(1, 0);
      for (int k = 0; k < i; ++k) {
        Complex x = a[j + k], y = wnk * a[j + k + i];
        a[j + k] = x + y;
        a[j + k + i] = x - y;
        wnk = wnk * wn;
      }
    }
  }
}
void init() {
  read(n);
  read(X);
  for (int i = 1; i <= n; ++i) {
    int x;
    read(x);
    cnt[i] = cnt[i - 1] + (x < X);
  }
  for (int i = 1; i <= n; ++i) {
    A[cnt[i - 1]].r += 1;
  }
  for (int i = 1; i <= n; ++i) {
    B[cnt[n] - cnt[i]].r += 1;
  }
}
void solve() {
  FFT_init(cnt[n] * 2);
  FFT(A, 1);
  FFT(B, 1);
  for (int i = 0; i < len; ++i) {
    A[i] = A[i] * B[i];
  }
  FFT(A, -1);
  for (int i = 0; i < cnt[n]; ++i) {
    ans[cnt[n] - i] = (long long)(A[i].r / len + 0.5);
  }
  int j = 0;
  for (int i = 1; i <= n; ++i) {
    if (cnt[i] == cnt[i - 1])
      ++j;
    else {
      ans[0] += (long long)j * (j + 1) / 2;
      j = 0;
    }
  }
  ans[0] += (long long)j * (j + 1) / 2;
  for (int i = 0; i <= n; ++i) {
    printf("%lld ", ans[i]);
  }
}
int main() {
  init();
  solve();
  return 0;
}
