#include <bits/stdc++.h>
#pragma G++ optimize(2)
using namespace std;
const int M = 1e6 + 10;
const double pi = acos(-1);
struct complex {
  double x, y;
  complex() {}
  complex(double a, double b) : x(a), y(b) {}
} A[M];
complex operator+(complex a, complex b) {
  return complex(a.x + b.x, a.y + b.y);
}
complex operator-(complex a, complex b) {
  return complex(a.x - b.x, a.y - b.y);
}
complex operator*(complex a, complex b) {
  return complex(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
int R[M];
void DFT(complex *a, int n, int f) {
  for (int i = 0; i <= n; i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  for (int i = 2; i <= n; i <<= 1) {
    int now = i >> 1;
    complex wn = complex(cos(2 * pi / i), f * sin(2 * pi / i));
    for (int j = 0; j < n; j += i) {
      complex w = complex(1, 0), x, y;
      for (int k = j; k < j + now; k++, w = w * wn) {
        x = a[k], y = w * a[k + now];
        a[k] = x + y;
        a[k + now] = x - y;
      }
    }
  }
  if (f == -1)
    for (int i = 0; i <= n; i++) a[i].y /= (2 * n);
}
void FFT(complex *a, int n, int m) {
  int K, lg;
  for (K = 1, lg = 0; K <= n + m; K <<= 1, ++lg)
    ;
  --lg;
  for (int i = 0; i <= K; i++) R[i] = (R[i >> 1] >> 1) | ((i & 1) << lg);
  DFT(a, K, 1);
  for (int i = 0; i <= K; i++) a[i] = a[i] * a[i];
  DFT(a, K, -1);
}
int n, x, a;
int Bef[M], Cnt[M];
int main() {
  scanf("%d%d", &n, &x);
  ++Cnt[0];
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a);
    Bef[i] = Bef[i - 1] + (a < x);
    ++Cnt[Bef[i]];
  }
  for (int i = 0; i <= n; i++) A[i] = complex(Cnt[i], Cnt[n - i]);
  FFT(A, n, n);
  A[n].y = (A[n].y - n - 1) / 2.0;
  for (int i = n; i <= n + n; i++) printf("%I64d ", (long long)(A[i].y + 0.5));
  return 0;
}
