#include <bits/stdc++.h>
using namespace std;
namespace FFT {
int get(int s) { return s > 1 ? 32 - __builtin_clz(s - 1) : 0; }
void fft(vector<complex<long double> >& a, bool inv) {
  int n = ((int)(a).size()), j = 0;
  vector<complex<long double> > roots(n / 2);
  for (int i = (1); i < (n); i++) {
    int bit = (n >> 1);
    while (j >= bit) {
      j -= bit;
      bit >>= 1;
    }
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  long double ang = 2 * acos(-1) / n * (inv ? -1 : 1);
  for (int i = 0; i < (n / 2); i++)
    roots[i] = complex<long double>(cos(ang * i), sin(ang * i));
  for (int i = 2; i <= n; i <<= 1) {
    int step = n / i;
    for (int j = 0; j < n; j += i) {
      for (int k = 0; k < i / 2; k++) {
        complex<long double> u = a[j + k],
                             v = a[j + k + i / 2] * roots[step * k];
        a[j + k] = u + v;
        a[j + k + i / 2] = u - v;
      }
    }
  }
  if (inv)
    for (int i = 0; i < (n); i++) a[i] /= n;
}
vector<unsigned long long> conv(vector<unsigned long long> a,
                                vector<unsigned long long> b, long long mod) {
  int s = ((int)(a).size()) + ((int)(b).size()) - 1, L = get(s), n = 1 << L;
  vector<complex<long double> > v1(n), v2(n), r1(n), r2(n);
  for (int i = 0; i < (((int)(a).size())); i++)
    v1[i] = complex<long double>(a[i] >> 15, a[i] & 32767);
  for (int i = 0; i < (((int)(b).size())); i++)
    v2[i] = complex<long double>(b[i] >> 15, b[i] & 32767);
  fft(v1, 0);
  fft(v2, 0);
  for (int i = 0; i < (n); i++) {
    int j = (i ? (n - i) : i);
    complex<long double> ans1 =
        (v1[i] + conj(v1[j])) * complex<long double>(0.5, 0);
    complex<long double> ans2 =
        (v1[i] - conj(v1[j])) * complex<long double>(0, -0.5);
    complex<long double> ans3 =
        (v2[i] + conj(v2[j])) * complex<long double>(0.5, 0);
    complex<long double> ans4 =
        (v2[i] - conj(v2[j])) * complex<long double>(0, -0.5);
    r1[i] = (ans1 * ans3) + (ans1 * ans4) * complex<long double>(0, 1);
    r2[i] = (ans2 * ans3) + (ans2 * ans4) * complex<long double>(0, 1);
  }
  fft(r1, 1);
  fft(r2, 1);
  vector<unsigned long long> ret(n);
  for (int i = 0; i < (n); i++) {
    long long av = (long long)round(r1[i].real());
    long long bv =
        (long long)round(r1[i].imag()) + (long long)round(r2[i].real());
    long long cv = (long long)round(r2[i].imag());
    av %= mod, bv %= mod, cv %= mod;
    ret[i] = (av << 30) + (bv << 15) + cv;
    ret[i] %= mod;
    ret[i] += mod;
    ret[i] %= mod;
  }
  ret.resize(s);
  return ret;
}
}  // namespace FFT
int n;
long long v[200000];
long long x;
vector<unsigned long long> a;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> x;
  for (int i = 0; i < (n); i++) cin >> v[i];
  a.push_back(1);
  for (int i = 0; i < (n); i++) {
    if (v[i] >= x)
      a.back()++;
    else
      a.push_back(1);
  }
  long long res0 = 0;
  for (const unsigned long long u : a) res0 += u * (u - 1) / 2;
  cout << res0;
  vector<unsigned long long> b(a);
  reverse((b).begin(), (b).end());
  vector<unsigned long long> c = FFT::conv(a, b, 1e18);
  for (int i = (((int)(a).size())); i < (((int)(c).size())); i++)
    cout << " " << c[i];
  for (int i = 0; i < (n - (((int)(c).size()) - ((int)(a).size()))); i++)
    cout << " 0";
  cout << "\n";
}
