#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
const int N = 1e6 + 100;
struct CP {
  double x, y;
  CP(double _x = 0.0, double _y = 0.0) : x(_x), y(_y) {}
  friend CP operator+(CP A, CP B) { return CP(A.x + B.x, A.y + B.y); }
  friend CP operator-(CP A, CP B) { return CP(A.x - B.x, A.y - B.y); }
  friend CP operator*(CP A, CP B) {
    return CP(A.x * B.x - A.y * B.y, A.x * B.y + B.x * A.y);
  }
} F[N], G[N];
int R[N];
int Lim = 1;
int m;
int L = 0;
void DFT(CP *A, int flag) {
  for (int i = 0; i < Lim; ++i)
    if (i < R[i]) swap(A[i], A[R[i]]);
  for (int i = 1; i < Lim; i = (i << 1)) {
    CP T = CP(cos(Pi / i), flag * sin(Pi / i));
    for (int j = 0; j < Lim; j += (i << 1)) {
      CP t = CP(1, 0);
      for (int l = 0; l < i; ++l, t = t * T) {
        CP Nx = A[j + l];
        CP Ny = t * A[i + j + l];
        A[j + l] = Nx + Ny;
        A[i + j + l] = Nx - Ny;
      }
    }
  }
}
int n, x;
int A[N];
long long ans[N] = {};
int sum[N] = {};
int main() {
  scanf("%d%d", &n, &x);
  for (int i = 1; i <= n; ++i) scanf("%d", &A[i]);
  int last = 0;
  for (int i = 1; i <= n; ++i) {
    last = last + (A[i] < x);
    F[last].x++;
  }
  int tot = last;
  ++tot;
  last = 0;
  for (int i = n; i >= 1; --i) {
    last = last + (A[i] < x);
    G[last].x++;
  }
  for (; Lim < tot * 2; Lim = Lim << 1, ++L)
    ;
  for (int i = 0; i < Lim; ++i) R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
  DFT(F, 1);
  DFT(G, 1);
  for (int i = 0; i < Lim; ++i) F[i] = F[i] * G[i];
  DFT(F, -1);
  for (int i = 0; i < tot; ++i)
    ans[tot - i] = (long long)(F[2 * tot - i - 1].x / Lim + 0.5);
  int now = 0;
  for (int i = 1; i <= n; ++i) {
    sum[i] = sum[i - 1] + (A[i] < x);
  }
  for (int i = 1; i <= n; ++i)
    if (sum[i] == sum[i - 1])
      ++now;
    else
      ans[0] += 1LL * now * (now - 1) / 2 + now, now = 0;
  ans[0] += 1LL * now * (now - 1) / 2 + now;
  for (int i = 0; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
