#include <bits/stdc++.h>
using namespace std;
struct compleks {
  double x, y;
};
compleks operator*(compleks a, compleks b) {
  compleks c;
  c.x = a.x * b.x - a.y * b.y;
  c.y = a.x * b.y + a.y * b.x;
  return c;
}
compleks operator-(compleks a, compleks b) {
  compleks c;
  c.x = a.x - b.x, c.y = a.y - b.y;
  return c;
}
compleks operator+(compleks a, compleks b) {
  compleks c;
  c.x = a.x + b.x, c.y = a.y + b.y;
  return c;
}
int pos[65536 * 8];
void fft(compleks a[], int typ) {
  for (int i = 0; i < 65536 * 8; i++)
    if (pos[i] > i) swap(a[i], a[pos[i]]);
  for (int p = 1; p < 65536 * 8; p <<= 1) {
    int m = p + p;
    compleks wx;
    wx.x = cos(2 * 3.141592653589793 / m * typ),
    wx.y = sin(2 * 3.141592653589793 / m * typ);
    for (int i = 0; i < 65536 * 8; i += m) {
      compleks w;
      w.x = 1, w.y = 0;
      for (int j = 0; j < p; j++, w = w * wx) {
        compleks e = a[i + j], f = a[i + j + p] * w;
        a[i + j] = e + f, a[i + j + p] = e - f;
      }
    }
  }
  if (typ == -1)
    for (int i = 0; i < 65536 * 8; i++)
      a[i].x /= 65536 * 8, a[i].y /= 65536 * 8;
}
void getpos() {
  for (int i = 0; i < 65536 * 8; i++)
    pos[i] = (pos[i >> 1] >> 1) | ((i & 1) << 16 + 3 - 1);
}
int a[65536 * 8];
int n;
int x;
int pre[65536 * 8];
int cnt[65536 * 8];
compleks c[65536 * 8], d[65536 * 8];
int main() {
  cin >> n >> x;
  cnt[0]++;
  long long di = 0;
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), pre[i] = pre[i - 1] + (a[i] < x), di += cnt[pre[i]],
                        cnt[pre[i]]++;
  getpos();
  for (int i = 0; i <= n; i++)
    c[i].x = cnt[i], d[-i + 65536 * 8 / 2].x = cnt[i];
  fft(c, 1);
  fft(d, 1);
  for (int i = 0; i < 65536 * 8; i++) c[i] = c[i] * d[i];
  fft(c, -1);
  for (int i = 0; i <= n; i++) {
    long long ai = (long long)(c[i + 65536 * 8 / 2].x + 0.5);
    if (i == 0) ai = di;
    printf("%lld ", ai);
  }
  return 0;
}
