#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
const long long INF = 1011111111;
const long long LLINF = 1000111000111000111LL;
const long double EPS = 1e-10;
const long double PI = 3.14159265358979323;
using namespace std;
long long powm(long long base, long long exp, long long mod = MOD) {
  long long ans = 1;
  while (exp) {
    if (exp & 1) ans = (ans * base) % mod;
    exp >>= 1, base = (base * base) % mod;
  }
  return ans;
}
const complex<double> II(0, 1);
complex<double> E[(2 << 21)];
void fft(long long n, double t, complex<double>* a) {
  for (long long m = n; m >= 2; t *= 2) {
    long long h = m / 2;
    for (long long i = 0; i < h; i++) E[i] = exp(i * t * II);
    for (long long j = 0; j < n; j += m)
      for (long long i = 0; i < h; i++) {
        complex<double> x = a[j + i] - a[j + i + h];
        a[j + i] += a[j + i + h];
        a[j + i + h] = E[i] * x;
      }
    m = h;
  }
  long long i = 0;
  for (long long j = 1; j < n - 1; j++) {
    for (long long k = n / 2; k > (i ^= k); k /= 2)
      ;
    if (j < i) swap(a[i], a[j]);
  }
}
void mul(complex<double>* a, complex<double>* b, long long n) {
  fft(n * 2, 3.141592653589793238462643383279 / n, a);
  fft(n * 2, 3.141592653589793238462643383279 / n, b);
  for (long long i = 0; i < n * 2; i++) b[i] *= a[i];
  fft(n * 2, -3.141592653589793238462643383279 / n, b);
  for (long long i = 0; i < n * 2; i++) b[i] /= (n * 2);
}
complex<double> a[(2 << 21)], b[(2 << 21)];
vector<long long> multiply(vector<long long> x, vector<long long> y) {
  vector<long long> res;
  long long n = (long long)x.size();
  long long m = (long long)y.size();
  long long mm = 1, tmp = max(n, m);
  while (mm < tmp) mm *= 2;
  for (long long i = 0; i < 2 * mm; i++) a[i] = b[i] = 0;
  for (long long i = 0; i < n; i++) a[i] = x[i];
  for (long long i = 0; i < m; i++) b[i] = y[i];
  mul(a, b, mm);
  for (long long i = 0; i < n + m; i++)
    res.push_back((long long)(b[i].real() + 0.5));
  return res;
}
long long mk[(2 << 21)];
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, x, y, p = 0;
  cin >> n >> x;
  for (long long i = 1; i < n + 1; i++) {
    cin >> y;
    if (y < x) mk[i] = 1;
  }
  vector<long long> v1, v2;
  long long cnt = 0;
  for (long long i = 1; i < n + 1; i++) {
    if (mk[i])
      v1.push_back(cnt + 1), cnt = 0;
    else
      cnt++;
  }
  v1.push_back(cnt + 1);
  for (auto i : v1) p += ((i * (i - 1)) / 2);
  v2 = v1;
  reverse((v2).begin(), (v2).end());
  long long nn = (long long)((v1).size());
  vector<long long> res = multiply(v1, v2);
  cout << p << " ";
  for (long long i = 1; i < nn; i++) cout << res[nn - 1 - i] << " ";
  for (long long i = nn; i < n + 1; i++) cout << 0 << " ";
  return 0;
}
