#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200005;
const int INF = (long long)1e9 + 5;
using cd = complex<long double>;
struct NTT {
  const long double PI = acos(-1);
  void fft(cd a[], int n, bool invert) {
    for (int i = 1, j = 0; i < n; i++) {
      int bit = n >> 1;
      for (; j & bit; bit >>= 1) j ^= bit;
      j ^= bit;
      if (i < j) swap(a[i], a[j]);
    }
    for (int len = 2; len <= n; len <<= 1) {
      long double ang = 2 * PI / len * (invert ? -1 : 1);
      cd wlen(cos(ang), sin(ang));
      for (int i = 0; i < n; i += len) {
        cd w(1);
        for (int 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 (int i = 0; i < n; i++) a[i] /= n;
    }
  }
} algo;
long long pref[MAXN], c0;
long long p1[MAXN], p2[MAXN];
cd po1[4 * MAXN], po2[4 * MAXN], po3[4 * MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int N, x, pw = 1;
  cin >> N >> x;
  while (pw < 2 * N + 1) pw <<= 1;
  p1[0]++;
  p2[N]++;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    pref[i + 1] = pref[i] + (a < x);
    p1[pref[i + 1]]++;
    p2[N - pref[i + 1]]++;
  }
  for (int i = 0; i <= N; i++) {
    c0 += p1[i] * (p1[i] - 1) / 2;
    po1[i] = {(long double)p1[i], 0.0};
    po2[i] = {(long double)p2[i], 0.0};
  }
  algo.fft(po1, pw, false);
  algo.fft(po2, pw, false);
  for (int i = 0; i < pw; i++) {
    po3[i] = po1[i] * po2[i];
  }
  algo.fft(po3, pw, true);
  cout << c0;
  for (int i = 1; i <= N; i++) {
    cout << ' ' << (long long)(po3[N + i].real() + 0.5);
  }
  cout << '\n';
  return 0;
}
