#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1);
int nearestPowerTwo(int n) {
  int r = 1;
  while (r < n) r <<= 1;
  return r;
}
void fft(vector<complex<long double> > &A, bool inv) {
  int n = int(A.size());
  for (int i = 1, j = 0; i < n - 1; i++) {
    for (int k = n >> 1; (j ^= k) < k; k >>= 1)
      ;
    if (i < j) swap(A[i], A[j]);
  }
  vector<complex<long double> > w(n >> 1);
  for (int k = 2; k <= n; k <<= 1) {
    complex<long double> w1 =
        polar((long double)1, (inv ? -1 : 1) * 2 * PI / k);
    w[0] = 1;
    for (int j = 1; j < k >> 1; j++) w[j] = w[j - 1] * w1;
    for (int i = 0; i < n; i += k) {
      for (int j = 0; j < k >> 1; j++) {
        complex<long double> u = A[i + j], v = A[i + j + (k >> 1)] * w[j];
        A[i + j] = u + v;
        A[i + j + (k >> 1)] = u - v;
      }
    }
  }
  if (inv)
    for (auto &x : A) x /= n;
}
template <typename T>
vector<T> multiply(const vector<T> &A, const vector<T> &B) {
  int n = int(A.size()) + int(B.size()) - 1, sz = nearestPowerTwo(n);
  vector<complex<long double> > FA(sz), FB(sz);
  for (int i = 0; i < int(A.size()); i++) FA[i] = A[i];
  for (int i = 0; i < int(B.size()); i++) FB[i] = B[i];
  fft(FA, false);
  fft(FB, false);
  for (int i = 0; i < sz; i++) FA[i] *= FB[i];
  fft(FA, true);
  vector<T> ans(n);
  for (int i = 0; i < n; i++) ans[i] = (T)(round(FA[i].real()));
  return ans;
}
const int mxn = 2e5 + 10;
int a[mxn];
int acc[mxn];
int main() {
  ;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < k) acc[i] = 1;
    if (i > 0) acc[i] += acc[i - 1];
  }
  vector<long long int> A(n + 1, 0);
  A[0] = 1;
  for (int i = 0; i < n; i++) A[acc[i]]++;
  auto B = A;
  reverse(B.begin(), B.end());
  auto C = multiply(A, B);
  long long int cero = 0;
  for (int l = 0; l < n; l++) {
    long long int r = l;
    while (r < n && a[r] >= k) r++;
    long long int aux = r - l;
    cero += (aux * (aux + 1)) / 2;
    l = r;
  }
  for (int i = 0; i < n + 1; i++) {
    if (i == 0)
      cout << cero << ' ';
    else
      cout << C[i + n] << ' ';
  }
  cout << '\n';
  return 0;
}
