#include <bits/stdc++.h>
using namespace std;
const int maxn = 530005;
const double pi = acos(-1);
int n, N, l, r[maxn], X, cnt[maxn], A[maxn];
complex<double> a[maxn], b[maxn];
long long ans[maxn];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') f = -1;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return x * f;
}
void W(long long x) {
  if (x >= 10) W(x / 10);
  putchar(x % 10 + '0');
}
inline void FFT(complex<double> *c, int F) {
  for (int i = 0; i < N; i++)
    if (i < r[i]) swap(c[i], c[r[i]]);
  for (int i = 1; i < N; i <<= 1) {
    complex<double> omega(cos(pi / i), F * sin(pi / i));
    for (int P = i << 1, j = 0; j < N; j += P) {
      complex<double> now(1, 0);
      for (int k = 0; k < i; k++, now *= omega) {
        complex<double> x = c[j + k], y = c[j + k + i] * now;
        c[j + k] = x + y;
        c[j + k + i] = x - y;
      }
    }
  }
  if (F == -1)
    for (int i = 0; i < N; i++) a[i] /= N;
}
inline void build() {
  for (int i = 0; i <= n; i++) a[i] = b[n - i] = cnt[i];
  for (N = 1; N <= (n << 1); N <<= 1) l++;
  for (int i = 0; i < N; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
}
inline void solve() {
  FFT(a, 1), FFT(b, 1);
  for (int i = 0; i < N; i++) a[i] *= b[i];
  FFT(a, -1);
  ans[0] = (long long)(floor(a[n].real() + 0.5) - n) >> 1;
  for (int i = 1; i <= n; i++) ans[i] = (long long)floor(a[n + i].real() + 0.5);
}
int main() {
  n = read(), X = read(), cnt[0]++;
  for (int i = 1; i <= n; i++) {
    A[i] = A[i - 1] + (read() < X);
    cnt[A[i]]++;
  }
  build();
  solve();
  for (int i = 0; i <= n; i++) W(ans[i]), putchar(' ');
  return 0;
}
