#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5;
const long long M = 300;
inline long long read() {
  long long s = 0;
  register bool neg = 0;
  register char c = getchar();
  for (; c < '0' || c > '9'; c = getchar()) neg |= (c == '-');
  for (; c >= '0' && c <= '9'; s = s * 10 + (c ^ 48), c = getchar())
    ;
  s = (neg ? -s : s);
  return s;
}
const long double pi = acos(-1);
long long a, b, s[N + 10], len = 1, r[N * 4 + 10];
struct comp {
  long double x, y;
  comp(long double _x = 0, long double _y = 0) { x = _x, y = _y; }
  comp operator+(const comp &o) const { return comp(x + o.x, y + o.y); }
  comp operator-(const comp &o) const { return comp(x - o.x, y - o.y); }
  comp operator*(const comp &o) const {
    return comp(x * o.x - y * o.y, x * o.y + y * o.x);
  }
} s1[N * 4 + 10], s2[N * 4 + 10];
inline void init(long long n) {
  for (; len <= n; len <<= 1)
    ;
  for (long long i = 0; i < len; i++)
    r[i] = ((r[i >> 1] >> 1) | ((i & 1) ? (len >> 1) : 0));
}
inline void FFT(comp *g, long long opt) {
  for (long long i = 0; i < len; i++)
    if (i < r[i]) swap(g[i], g[r[i]]);
  for (long long i = 2; i <= len; i <<= 1) {
    comp p(cos(2 * pi / i), sin(2 * pi / i) * opt);
    for (long long j = 0; j < len; j += i) {
      comp w(1, 0);
      for (long long k = j; k < j + i / 2; k++) {
        comp tmp = w * g[k + i / 2];
        g[k + i / 2] = g[k] - tmp;
        g[k] = g[k] + tmp;
        w = w * p;
      }
    }
  }
  if (opt == -1)
    for (long long i = 0; i < len; i++) g[i].x /= len;
}
signed main() {
  a = read();
  b = read();
  init(a << 1);
  for (long long i = 1; i <= a; i++) s[i] = ((read() < b) ? 1 : 0) + s[i - 1];
  for (long long i = 1; i <= a; i++) s1[s[i]].x++, s2[a - s[i] + 1].x++;
  s2[a + 1].x++;
  s1[0].x++;
  FFT(s1, 1);
  FFT(s2, 1);
  for (long long i = 0; i < len; i++) s1[i] = s1[i] * s2[i];
  FFT(s1, -1);
  printf("%lld ", ((long long)(s1[a + 1].x + 0.5) - a) / 2);
  for (long long i = a + 2; i <= a * 2 + 1; i++)
    printf("%lld ", (long long)(s1[i].x + 0.5));
  return 0;
}
