#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int inf = 1e9;
const long long Inf = 1e18;
const int N = 2e6 + 10;
int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while ((ch < '0' || ch > '9') && ch != '-') ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
template <typename T>
void chkmax(T &a, T b) {
  a < b ? a = b : 0;
};
template <typename T>
void chkmin(T &a, T b) {
  a > b ? a = b : 0;
};
namespace FFT {
int n, m, l, r[N];
void FFT(complex<long double> *a, int f) {
  for (int i = 0; i < n; i++)
    if (i < r[i]) swap(a[i], a[r[i]]);
  for (int i = 1; i < n; i <<= 1) {
    complex<long double> wn(cos(pi / i), f * sin(pi / i));
    for (int p = i << 1, j = 0; j < n; j += p) {
      complex<long double> w(1, 0);
      for (int k = 0; k < i; k++, w *= wn) {
        complex<long double> x = a[j + k], y = w * a[j + k + i];
        a[j + k] = x + y;
        a[j + k + i] = x - y;
      }
    }
  }
  if (f == -1)
    for (int i = 0; i <= n; i++) a[i] /= n;
}
void calc(complex<long double> *a, complex<long double> *b, int _n, int _m) {
  n = _n, m = _m, l = 0;
  m += n;
  for (n = 1; n <= m; n <<= 1) l++;
  for (int i = 0; i < n; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
  FFT(a, 1);
  FFT(b, 1);
  for (int i = 0; i <= n; i++) a[i] *= b[i];
  FFT(a, -1);
}
}  // namespace FFT
int n, x, sum[N];
complex<long double> a[N], b[N];
int main() {
  cin >> n >> x;
  for (int i = 1, v; i <= n; i++) v = gi(), sum[i] = sum[i - 1] + (v < x);
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    int l = i, r = n, ret = -1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (sum[mid] - sum[i - 1] == 0)
        ret = mid, l = mid + 1;
      else
        r = mid - 1;
    }
    if (ret != -1) ans += ret - i + 1;
  }
  printf("%lld ", ans);
  for (int i = 1; i <= n; i++) a[sum[i]] += 1, b[n - sum[i - 1]] += 1;
  FFT::calc(a, b, n, n);
  for (int i = 1; i <= n; i++)
    printf("%lld ", (long long)(a[i + n].real() + 0.5));
  return 0;
}
