#include <bits/stdc++.h>
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(const char *s) { return to_string((string)s); }
string to_string(const bool &b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(const A &v) {
  bool first = true;
  string res = "{";
  for (const auto &x : v) {
    if (!first) res += ", ";
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void debug_out() { cerr << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
template <typename T>
inline bool ckmax(T &a, const T &b) {
  return a < b ? a = b, true : false;
}
template <typename T>
inline bool ckmin(T &a, const T &b) {
  return a > b ? a = b, true : false;
}
template <typename T>
inline long long sqr(T x) {
  return 1ll * x * x;
}
const double PI = acos(-1), eps = 1e-9;
const long long mod = 1e9 + 7, OO = 0x3f3f3f3f3f3f3f3f;
const long long oo = 0x3f3f3f3f;
long long powMod(long long a, long long b) {
  assert(b >= 0);
  long long res = 1;
  for (a %= mod; b; b >>= 1, a = a * a % mod) {
    if (b & 1) {
      res = res * a % mod;
    }
  }
  return res;
}
void solve();
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  solve();
  return 0;
}
namespace fft {
struct cp {
  double x, y;
  cp() { x = y = 0; }
  cp(double x, double y) : x(x), y(y) {}
};
inline cp operator+(cp a, cp b) { return cp(a.x + b.x, a.y + b.y); }
inline cp operator-(cp a, cp b) { return cp(a.x - b.x, a.y - b.y); }
inline cp operator*(cp a, cp b) {
  return cp(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
inline cp conj(cp a) { return cp(a.x, -a.y); }
long long base = 1;
vector<cp> roots = {{0, 0}, {1, 0}};
vector<long long> rev = {0, 1};
const double PI = acosl(-1.0);
void ensure_base(long long nbase) {
  if (nbase <= base) return;
  rev.resize(static_cast<unsigned long>(1 << nbase));
  for (long long i = 0; i < (1 << nbase); i++)
    rev[i] = (rev[i >> 1] >> 1) + ((i & 1) << (nbase - 1));
  roots.resize(static_cast<unsigned long>(1 << nbase));
  while (base < nbase) {
    double angle = 2 * PI / (1 << (base + 1));
    for (long long i = 1 << (base - 1); i < (1 << base); i++) {
      roots[i << 1] = roots[i];
      double angle_i = angle * (2 * i + 1 - (1 << base));
      roots[(i << 1) + 1] = cp(cos(angle_i), sin(angle_i));
    }
    base++;
  }
}
void fft(vector<cp> &a, long long n = -1) {
  if (n == -1) n = a.size();
  assert((n & (n - 1)) == 0);
  long long zeros = __builtin_ctz(n);
  ensure_base(zeros);
  long long shift = base - zeros;
  for (long long i = 0; i < n; i++)
    if (i < (rev[i] >> shift)) swap(a[i], a[rev[i] >> shift]);
  for (long long k = 1; k < n; k <<= 1)
    for (long long i = 0; i < n; i += 2 * k)
      for (long long j = 0; j < k; j++) {
        cp z = a[i + j + k] * roots[j + k];
        a[i + j + k] = a[i + j] - z;
        a[i + j] = a[i + j] + z;
      }
}
vector<cp> fa, fb;
vector<long long> multiply(vector<long long> &a, vector<long long> &b) {
  long long need = a.size() + b.size() - 1;
  long long nbase = 0;
  while ((1 << nbase) < need) nbase++;
  ensure_base(nbase);
  long long sz = 1 << nbase;
  if (sz > (long long)fa.size()) fa.resize(static_cast<unsigned long>(sz));
  for (long long i = 0; i < sz; i++) {
    long long x = (i < (long long)a.size() ? a[i] : 0);
    long long y = (i < (long long)b.size() ? b[i] : 0);
    fa[i] = cp(x, y);
  }
  fft(fa, sz);
  cp r(0, -0.25 / sz);
  for (long long i = 0; i <= (sz >> 1); i++) {
    long long j = (sz - i) & (sz - 1);
    cp z = (fa[j] * fa[j] - conj(fa[i] * fa[i])) * r;
    if (i != j) {
      fa[j] = (fa[i] * fa[i] - conj(fa[j] * fa[j])) * r;
    }
    fa[i] = z;
  }
  fft(fa, sz);
  vector<long long> res(static_cast<unsigned long>(need));
  for (long long i = 0; i < need; i++) {
    res[i] = fa[i].x + 0.5;
  }
  return res;
}
};  // namespace fft
const long long N = 1 << 20;
long long a[N], pre[N];
void solve() {
  long long n, x;
  cin >> n >> x;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] < x)
      a[i] = 1;
    else
      a[i] = 0;
  }
  for (long long i = 1; i <= n; i++) pre[i] = pre[i - 1] + a[i];
  vector<long long> aa(2 * n + 2), bb(2 * n + 2);
  for (long long i = 0; i <= n; i++) aa[n + pre[i]]++;
  for (long long i = 0; i <= n; i++) bb[n - pre[i]]++;
  auto ans = fft::multiply(aa, bb);
  ans[n * 2] -= (n + 1);
  ans[n * 2] >>= 1;
  vector<long long> real;
  for (long long i = n * 2; i <= n * 3; i++) real.push_back(ans[i]);
  for (auto &xx : real) cout << xx << ' ';
  return;
}
