#include <bits/stdc++.h>
namespace pb_ds {
namespace io {
const long long MaxBuff = 1 << 15;
const long long Output = 1 << 23;
char B[MaxBuff], *S = B, *T = B;
char Out[Output], *iter = Out;
inline void flush() {
  fwrite(Out, 1, iter - Out, stdout);
  iter = Out;
}
}  // namespace io
template <class Type>
inline Type Read() {
  using namespace io;
  register char ch;
  register Type ans = 0;
  register bool neg = 0;
  while (ch = ((S == T) && (T = (S = B) + fread(B, 1, MaxBuff, stdin), S == T)
                   ? 0
                   : *S++),
         (ch < '0' || ch > '9') && ch != '-')
    ;
  ch == '-' ? neg = 1 : ans = ch - '0';
  while (ch = ((S == T) && (T = (S = B) + fread(B, 1, MaxBuff, stdin), S == T)
                   ? 0
                   : *S++),
         '0' <= ch && ch <= '9')
    ans = ans * 10 + ch - '0';
  return neg ? -ans : ans;
}
template <class Type>
inline void Print(register Type x, register char ch = '\n') {
  using namespace io;
  if (!x)
    *iter++ = '0';
  else {
    if (x < 0) *iter++ = '-', x = -x;
    static long long s[100];
    register long long t = 0;
    while (x) s[++t] = x % 10, x /= 10;
    while (t) *iter++ = '0' + s[t--];
  }
  *iter++ = ch;
}
}  // namespace pb_ds
using namespace pb_ds;
using namespace std;
const long long N = 2e5 + 5;
const long long M = (1 << 20) + 5;
const double PI = acos(-1);
long long n, m, lim, lg;
long long s[N], ans[N];
struct Complex {
  double x, y;
  inline Complex operator+(const Complex &u) const {
    return (Complex){x + u.x, y + u.y};
  }
  inline Complex operator-(const Complex &u) const {
    return (Complex){x - u.x, y - u.y};
  }
  inline Complex operator*(const Complex &u) const {
    return (Complex){x * u.x - y * u.y, x * u.y + u.x * y};
  }
} f[M], g[M];
long long rev[M];
inline void FFT(Complex *a, long long flag) {
  for (long long i = 0; i < lim; ++i)
    if (rev[i] < i) swap(a[rev[i]], a[i]);
  for (long long len = 2; len <= lim; len <<= 1) {
    Complex wn = (Complex){cos(2.0 * PI / len), sin(2.0 * PI / len) * flag};
    for (long long l = 0; l + len - 1 < lim; l += len) {
      long long r = l + len - 1, mid = (l + r >> 1);
      Complex wnk = (Complex){1, 0};
      for (long long i = 0; i <= mid - l; ++i, wnk = wnk * wn) {
        Complex k1 = a[l + i], k2 = wnk * a[mid + i + 1];
        a[l + i] = k1 + k2, a[mid + i + 1] = k1 - k2;
      }
    }
  }
}
signed main() {
  n = Read<long long>(), m = Read<long long>();
  f[0].x = g[n].x = 1, lim = 1, lg = 0;
  for (long long i = 1; i <= n; ++i)
    s[i] = s[i - 1] + (Read<long long>() < m), ++f[s[i]].x, ++g[n - s[i]].x;
  while (lim <= n + n) lim <<= 1, ++lg;
  for (long long i = 0; i < lim; ++i)
    rev[i] = (rev[i >> 1] >> 1) + ((i & 1) << (lg - 1));
  FFT(f, 1), FFT(g, 1);
  for (long long i = 0; i < lim; ++i) f[i] = f[i] * g[i];
  FFT(f, -1);
  for (long long i = 0; i < lim; ++i) f[i].x = (long long)(f[i].x / lim + 0.5);
  for (long long i = 0; i <= n; ++i) ans[i] = f[n + i].x;
  ans[0] -= (n + 1);
  ans[0] >>= 1;
  for (long long i = 0; i <= n; ++i) printf("%lld ", ans[i]);
  puts("");
  return 0;
}
