#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, k = 0;
  char c = getchar();
  while (c < 48 || c > 57) k |= (c == '-'), c = getchar();
  while (c >= 48 && c <= 57) x = x * 10 + (c ^ 48), c = getchar();
  return k ? -x : x;
}
const int N = 1e6;
const double PI = acos(-1);
int s[N + 5], r[N + 5];
struct Complex {
  double x, y;
  Complex(double _x = 0, double _y = 0) : x(_x), y(_y) {}
  inline Complex operator+(const Complex &a) {
    return Complex(x + a.x, y + a.y);
  }
  inline Complex operator-(const Complex &a) {
    return Complex(x - a.x, y - a.y);
  }
  inline Complex operator*(const Complex &a) {
    return Complex(x * a.x - y * a.y, x * a.y + y * a.x);
  }
} A[N + 5], B[N + 5], C[N + 5];
inline void FFT(Complex *f, int n, int o) {
  for (int i = 0; i < n; ++i)
    if (i < r[i]) swap(f[i], f[r[i]]);
  for (int l = 2; l <= n; l <<= 1) {
    int m = l >> 1;
    Complex wn(cos(PI / m), sin(PI / m) * o);
    for (int i = 0; i < n; i += l) {
      Complex w = Complex(1, 0);
      for (int j = 0; j < m; ++j, w = w * wn) {
        Complex x = f[i + j], y = f[i + m + j] * w;
        f[i + j] = x + y, f[i + m + j] = x - y;
      }
    }
  }
}
inline void Mul(Complex *A, Complex *B, Complex *C, int n, int m) {
  int l = 0;
  for (m += n, n = 1; n <= m; n <<= 1) ++l;
  for (int i = 0; i < n; ++i) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
  FFT(A, n, 1);
  FFT(B, n, 1);
  for (int i = 0; i < n; ++i) C[i] = A[i] * B[i];
  FFT(C, n, -1);
  for (int i = 0; i < n; ++i) C[i].x = (long long)(C[i].x / n + 0.5);
}
int main() {
  int n = read(), m = read();
  long long ans0 = 0;
  for (int i = 1, x; i <= n; ++i) {
    scanf("%d", &x);
    s[i] = x < m ? s[i - 1] + 1 : s[i - 1];
  }
  for (int i = 0; i <= n; ++i) {
    ans0 += (long long)A[s[i]].x;
    A[s[i]].x++;
    B[n - s[i]].x++;
  }
  Mul(A, B, C, n, n);
  printf("%lld ", ans0);
  for (int i = 1; i <= n; ++i) printf("%lld ", (long long)C[n + i].x);
  return 0;
}
