#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int maxn = 2e6 + 7;
struct Complex {
  double x, y;
  Complex(double _x = 0.0, double _y = 0.0) : x(_x), y(_y) {}
  Complex operator-(const Complex &b) const {
    return Complex(x - b.x, y - b.y);
  }
  Complex operator+(const Complex &b) const {
    return Complex(x + b.x, y + b.y);
  }
  Complex operator*(const Complex &b) const {
    return Complex(x * b.x - y * b.y, x * b.y + y * b.x);
  }
};
void change(Complex *y, int len) {
  for (int i = 1, j = len / 2; i < len - 1; i++) {
    if (i < j) swap(y[i], y[j]);
    int k = len / 2;
    while (j >= k) {
      j -= k;
      k /= 2;
    }
    if (j < k) j += k;
  }
}
void fft(Complex *y, int len, int on) {
  change(y, len);
  for (int h = 2; h <= len; h <<= 1) {
    Complex wn(cos(-on * 2 * pi / h), sin(-on * 2 * pi / h));
    for (int j = 0; j < len; j += h) {
      Complex w(1, 0);
      for (int k = j; k < j + h / 2; k++) {
        Complex u = y[k];
        Complex t = w * y[k + h / 2];
        y[k] = u + t;
        y[k + h / 2] = u - t;
        w = w * wn;
      }
    }
  }
  if (on == -1)
    for (int i = 0; i < len; ++i) y[i].x /= len;
}
int n, x, a[maxn], b[maxn], s[maxn];
Complex c1[maxn], c2[maxn];
int main() {
  cin >> n >> x;
  for (int i = 1, v; i <= n; ++i) {
    cin >> v;
    if (v >= x)
      s[i] = s[i - 1];
    else
      s[i] = s[i - 1] + 1;
    a[s[i]]++;
  }
  a[0]++;
  int len = 1;
  while (len <= n + n) len <<= 1;
  for (int i = 0; i <= n; ++i)
    c1[i] = Complex(a[i], 0), c2[i] = Complex(a[n - i], 0);
  fft(c1, len, 1);
  fft(c2, len, 1);
  for (int i = 0; i < len; ++i) c1[i] = c1[i] * c2[i];
  fft(c1, len, -1);
  int p = 0;
  long long res = 0;
  for (int i = 1; i <= n; ++i)
    if (s[i] != s[i - 1])
      p = i, res += i - p;
    else
      res += i - p;
  cout << res << " ";
  for (int i = n - 1; i >= 0; --i)
    cout << (long long)(c1[i].x + 0.5) << " \n"[i == 0];
}
