#include <bits/stdc++.h>
using namespace std;
int s[2000005], x, n, m, t[2000005];
const double pi = acos(-1);
struct cp {
  cp(double xx = 0, double yy = 0) { x = xx, y = yy; }
  double x, y;
  cp operator+(cp const &a) const { return cp(x + a.x, y + a.y); }
  cp operator-(cp const &a) const { return cp(x - a.x, y - a.y); }
  cp operator*(cp const &a) const {
    return cp(x * a.x - y * a.y, x * a.y + y * a.x);
  }
} a[2000005 << 1], b[2000005 << 1];
int tr[2000005 << 1];
void fft(cp *f, bool flag) {
  for (int i = 0; i < n; i++) {
    if (i < tr[i]) swap(f[i], f[tr[i]]);
  }
  for (int i = 2; i <= n; i <<= 1) {
    int len = i / 2;
    cp bas(cos(2 * pi / i), sin(2 * pi / i));
    if (!flag) bas.y *= -1;
    for (int j = 0; j < n; j += i) {
      cp now(1, 0);
      for (int k = j; k < j + len; k++) {
        cp tmp = now * f[k + len];
        f[k + len] = f[k] - tmp;
        f[k] = f[k] + tmp;
        now = now * bas;
      }
    }
  }
}
int main() {
  scanf("%d%d", &n, &x);
  a[0].x = 1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &s[i]);
    if (s[i] < x)
      s[i] = 1;
    else
      s[i] = 0;
    s[i] += s[i - 1];
    a[s[i]].x++;
  }
  for (int i = 0; i <= n; i++) {
    b[i].x = a[n - i].x;
  }
  int m = 2 * n;
  for (n = 1; n <= m; n <<= 1)
    ;
  for (int i = 0; i < n; i++)
    tr[i] = (tr[i >> 1] >> 1) | ((i & 1) ? (n >> 1) : 0);
  fft(a, 1), fft(b, 1);
  for (int i = 0; i < n; i++) a[i] = a[i] * b[i];
  fft(a, 0);
  int last = 1;
  long long cnt = 0;
  for (int i = 1; i <= m / 2; i++) {
    if (s[i] > s[i - 1]) {
      cnt += (long long)last * (last - 1) / 2;
      last = 0;
    }
    last++;
  }
  printf("%lld ", cnt + (long long)last * (last - 1) / 2);
  for (int i = m / 2 + 1; i <= m; i++) {
    printf("%lld ", (long long)(a[i].x / n + 0.49));
  }
  return 0;
}
