#include <bits/stdc++.h>
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void JIZZ(string output = "") {
  cout << output;
  exit(0);
}
const double PI = acos(-1);
const long double eps = 1e-13;
const long long mod = 1e9 + 7;
complex<double> a[524288], b[524288], r[524288], o[524288];
int N = 262144, base;
void fft(complex<double> *x) {
  int size = 0, mask = (N >> 1) - 1;
  for (int i = base - 1; i >= 0; --i, size = size * 2 + 1, mask >>= 1) {
    for (int j = 0; j < N; ++j) {
      int front = j >> i, back = j & mask;
      int a = (front & size) << 1, b = a + 1;
      r[j] = x[(a << i) | back] + x[(b << i) | back] * o[front << i];
    }
    for (int j = 0; j < N; ++j) x[j] = r[j];
  }
}
void ifft(complex<double> *x) {
  fft(x);
  reverse(x + 1, x + N);
  for (int i = 0; i < N; ++i) x[i] /= N;
}
int val[200005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, x;
  cin >> n >> x;
  for (int i = 1; i <= n; ++i) cin >> val[i];
  for (int i = 1; i <= n; ++i) {
    if (val[i] < x)
      val[i] = 1;
    else
      val[i] = 0;
    ;
    ;
  }
  vector<int> nval;
  nval.push_back(1);
  for (int i = 1; i <= n; ++i) {
    if (val[i])
      nval.push_back(1);
    else
      ++nval.back();
  };
  ;
  long long ans0 = 0;
  for (int i : nval) ans0 += 1ll * i * (i - 1) / 2;
  N = nval.size() - 1;
  for (int i = 0; i <= N; ++i) a[i] = complex<double>(nval[i], 0);
  for (int i = N, j = 0; i >= 0; --i, ++j) b[i] = complex<double>(nval[j], 0);
  ++N;
  N <<= 1;
  while (N != ((N) & (-(N)))) N += ((N) & (-(N)));
  while ((1 << base) < N) ++base;
  for (int i = 0; i < N; ++i)
    o[i] = exp(2 * i * PI / N * complex<double>(0, 1));
  ;
  ;
  fft(a);
  fft(b);
  for (int i = 0; i < N; ++i) a[i] *= b[i];
  ifft(a);
  ;
  ;
  cout << ans0 << " ";
  int cnt = 1;
  for (int i = nval.size() - 2; i >= 0; --i) {
    cout << (long long)(a[i].real() + 0.5) << " ";
    ++cnt;
  }
  while (cnt <= n) ++cnt, cout << 0 << " ";
  cout << endl;
}
