#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * f;
}
const double pi = acos(-1);
struct cpx {
  double x, y;
  cpx(double xx = 0, double yy = 0) { x = xx, y = yy; }
  cpx operator+(const cpx &z) { return cpx(x + z.x, y + z.y); }
  cpx operator-(const cpx &z) { return cpx(x - z.x, y - z.y); }
  cpx operator*(const cpx &z) {
    return cpx(x * z.x - y * z.y, x * z.y + y * z.x);
  }
} f[4 * 200100], g[4 * 200100];
int r[4 * 200100];
void FFT(cpx *A, int n) {
  for (int i = 0; i < n; ++i)
    if (i < r[i]) swap(A[i], A[r[i]]);
  for (int p = 2; p <= n; p <<= 1) {
    int len = p >> 1;
    cpx root = cpx(cos(2 * pi / p), sin(2 * pi / p));
    for (int k = 0; k < n; k += p) {
      cpx w = cpx(1, 0);
      for (int i = k; i < k + len; ++i) {
        cpx x = A[i], y = A[i + len];
        A[i] = x + w * y;
        A[i + len] = x - w * y;
        w = w * root;
      }
    }
  }
}
long long n, s[200100], len, l, a[200100];
int main() {
  n = read();
  int x = read();
  for (int i = 1; i <= n; ++i) {
    a[i] = (read() < x);
    s[i] = s[i - 1] + a[i];
    f[s[i]].x++;
  }
  f[0].x++;
  for (int i = 0; i <= n; ++i) g[i] = f[n - i];
  len = 1, l = 0;
  for (; len <= n + n; len <<= 1) ++l;
  for (int i = 0; i < len; ++i) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
  FFT(g, len);
  FFT(f, len);
  for (int i = 0; i < len; ++i) f[i] = f[i] * g[i];
  FFT(f, len);
  reverse(f + 1, f + len);
  for (int i = 0; i < len; ++i) {
    f[i].x /= len;
  }
  long long cnt = 0, ans = 0;
  for (int i = 1; i <= n; ++i) {
    if (a[i]) {
      ans += cnt * (cnt + 1) / 2;
      cnt = 0;
    } else {
      ++cnt;
    }
  }
  ans += cnt * (cnt + 1) / 2;
  printf("%lld ", ans);
  for (int i = n + 1; i <= n + n; ++i) {
    printf("%lld ", (long long)(f[i].x + 0.5));
  }
  return 0;
}
