#include <bits/stdc++.h>
using namespace std;
const int N = 2000010;
complex<double> b0[N], b1[N];
void fft(complex<double> *a, int len, int f) {
  for (int i = 0, j = 0; i < len; i++) {
    if (i < j) swap(a[i], a[j]);
    for (int t = len >> 1; (j ^= t) < t; t >>= 1)
      ;
  }
  for (int i = 1; i < len; i <<= 1) {
    complex<double> wn(cos(acos(-1) / i), sin(acos(-1) / i) * f);
    for (int j = 0; j < len; j += (i << 1)) {
      complex<double> w(1, 0);
      for (int k = 0; k < i; k++, w = w * wn) {
        complex<double> x = a[j + k], y = w * a[j + k + i];
        a[j + k] = x + y;
        a[j + k + i] = x - y;
      }
    }
  }
  if (f == -1)
    for (int i = 0; i <= len; i++) a[i] /= len;
}
int a[N];
long long ans[N];
int main() {
  int n, x;
  scanf("%d%d", &n, &x);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < x)
      a[i] = 1;
    else
      a[i] = 0;
  }
  int la = 0, cnt = -1;
  for (int i = 1; i <= n; i++)
    if (a[i] == 1) {
      b0[++cnt] = i - la,
      ans[0] += 1ll * (i - la - 1) * (i - la - 2) / 2 + i - la - 1, la = i;
    }
  b0[++cnt] = n + 1 - la, ans[0] += 1ll * (n - la) * (n - la - 1) / 2 + n - la;
  for (int i = 0; i <= cnt; i++) b1[i] = b0[cnt - i];
  int len = 1;
  while (len <= (cnt << 1)) len <<= 1;
  fft(b0, len, 1);
  fft(b1, len, 1);
  for (int i = 0; i <= len - 1; i++) b0[i] = b0[i] * b1[i];
  fft(b0, len, -1);
  for (int i = 1; i <= cnt; i++) ans[i] = (long long)(b0[cnt - i].real() + 0.5);
  for (int i = 0; i <= n; i++) printf("%lld ", ans[i]);
  printf("\n");
  return 0;
}
