#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e6 + 10;
long long rev[maxn];
const double pi = acos(-1.0);
inline void fft(complex<double> *a, long long n, long long inv) {
  long long bit = 0;
  while ((1 << bit) < n) bit++;
  for (long long i = 0; i < n; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (long long mid = 1; mid < n; mid *= 2) {
    complex<double> temp(cos(pi / mid), inv * sin(pi / mid));
    for (long long i = 0; i < n; i += mid * 2) {
      complex<double> omega(1, 0);
      for (long long j = 0; j < mid; j++, omega *= temp) {
        complex<double> x = a[i + j], y = omega * a[i + j + mid];
        a[i + j] = x + y, a[i + j + mid] = x - y;
      }
    }
  }
}
inline long long read() {
  char c = getchar();
  long long x = 0;
  bool f = 0;
  for (; !isdigit(c); c = getchar()) f ^= !(c ^ 45);
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  if (f) x = -x;
  return x;
}
complex<double> a[maxn], b[maxn];
long long bn, n, x, cnt, ans[maxn];
long long s[maxn], f[maxn], tmp = 0;
inline void input() {
  n = read(), x = read();
  for (long long i = 0; i < n; i++) {
    long long t = read();
    if (t >= x)
      tmp++;
    else {
      ans[0] += tmp * (tmp + 1) / 2;
      tmp = 0;
    }
    if (t < x)
      s[i] = s[i - 1] + 1;
    else
      s[i] = s[i - 1];
    f[s[i]]++;
  }
  f[0]++;
  ans[0] += tmp * (tmp + 1) / 2;
  for (long long i = 0; i < n; i++) {
    a[i] = f[i];
    b[i] = f[n - i];
  }
  long long bit = 0;
  while ((1 << bit) < 2 * n) bit++;
  bn = (1 << bit);
  for (long long i = 0; i < bn; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (bit - 1));
}
inline void work() {
  fft(a, bn, 1);
  fft(b, bn, 1);
  for (long long i = 0; i <= bn; i++) a[i] = a[i] * b[i];
  fft(a, bn, -1);
  for (long long i = 1; i <= n; i++)
    ans[i] = (long long)(a[n - i].real() / bn + 0.5);
  for (long long i = 0; i <= n; i++) cout << ans[i] << " ";
  cout << endl;
}
signed main() {
  input();
  work();
  return 0;
}
