#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 20, maxm = 1e6 + 10;
const double pi = acos(-1.0);
struct cp {
  double x, y;
} a[maxn], b[maxn];
cp operator*(cp a, cp b) {
  return {a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x};
}
cp operator+(cp a, cp b) { return {a.x + b.x, a.y + b.y}; }
cp operator-(cp a, cp b) { return {a.x - b.x, a.y - b.y}; }
class fourier {
 public:
  int rev[maxn], len, pw;
  void init(int n) {
    len = 1, pw = 0;
    while (len <= n) len <<= 1, pw++;
    for (int i = 0; i <= len - 1; i++) rev[i] = 0;
    for (int i = 0; i <= len - 1; i++)
      rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (pw - 1));
  }
  void transform(cp* a, int flag) {
    for (int i = 0; i <= len - 1; i++)
      if (i < rev[i]) swap(a[i], a[rev[i]]);
    for (int mid = 1; mid < len; mid <<= 1) {
      cp wn = {cos(pi / mid), flag * sin(pi / mid)};
      for (int r = mid << 1, j = 0; j < len; j += r) {
        cp t = {1, 0};
        for (int k = 0; k < mid; k++, t = t * wn) {
          cp x = a[j + k], y = t * a[mid + j + k];
          a[j + k] = x + y, a[j + k + mid] = x - y;
        }
      }
    }
    if (flag == -1)
      for (int i = 0; i <= len - 1; i++) a[i].x /= len;
  }
} fft;
int t[maxn];
int n, x, all;
long long CNT() {
  int last = 0;
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    if (t[i] == 0)
      last++;
    else {
      ans += 1ll * last * (last + 1) / 2;
      last = 0;
    }
  }
  ans += 1ll * last * (last + 1) / 2;
  return ans;
}
int main() {
  std::ios::sync_with_stdio(false);
  cin >> n >> x;
  for (int i = 1; i <= n; i++) {
    cin >> t[i];
    if (t[i] < x)
      t[i] = 1;
    else
      t[i] = 0;
    all += t[i];
  }
  int num = 0;
  for (int i = 1; i <= n; i++) {
    a[num].x++;
    num += t[i];
  }
  num = 0;
  for (int i = n; i >= 1; i--) {
    b[num].x++;
    num += t[i];
  }
  fft.init(2 * n);
  fft.transform(a, 1);
  fft.transform(b, 1);
  for (int i = 0; i <= fft.len; i++) a[i] = a[i] * b[i];
  fft.transform(a, -1);
  cout << CNT() << " ";
  for (int i = 1; i <= n; i++) {
    long long ans = (long long)(a[all - i].x + 0.5);
    cout << ans;
    if (i == n)
      cout << "\n";
    else
      cout << " ";
  }
}
