#include <bits/stdc++.h>
using namespace std;
using namespace rel_ops;
using ll = int64_t;
using Pii = pair<int, int>;
using ull = uint64_t;
using Vi = vector<int>;
void run();
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(10);
  run();
  return 0;
}
int uplg(int n) { return 32 - __builtin_clz(n); }
int uplg(ll n) { return 64 - __builtin_clzll(n); }
int cmp(double a, double b, double eps = 1e-9) {
  return (a > b + eps) - (a + eps < b);
}
using Vfft = vector<complex<long double>>;
Vfft bases;
void initFFT(int n) {
  bases.resize(n + 1, 1);
  auto b = exp(complex<long double>(0, 2 * M_PI / n));
  for (int i = (1); i < (n + 1); i++) bases[i] = b * bases[i - 1];
}
template <int dir>
void fft(Vfft& buf) {
  int n = int((buf).size()), bits = 31 - __builtin_clz(n);
  int i = (dir > 0 ? 0 : bits - 1);
  for (; i >= 0 && i < bits; i += dir) {
    int shift = 1 << (bits - i - 1);
    for (int j = (0); j < (1 << i); j++)
      for (int k = (0); k < (shift); k++) {
        int a = (j << (bits - i)) | k;
        int b = a | shift;
        auto v1 = buf[a], v2 = buf[b];
        auto base = bases[(dir * (k << i)) & (n - 1)];
        if (dir > 0) {
          buf[b] = (v1 - v2) * base;
        } else {
          v2 = v2 * base;
          buf[b] = v1 - v2;
        }
        buf[a] = v1 + v2;
      }
  }
  if (dir < 0) {
    long double second = 1;
    second /= n;
    for (auto& first : (buf)) first = first * second;
  }
}
struct Poly {
  using T = long double;
  vector<T> C;
  Poly(int n = 0) { C.resize(n); }
  void reduce() {
    while (!C.empty() && fabs(C.back()) <= 1e-9) C.pop_back();
  }
  T eval(T first) {
    T n = 0, second = 1;
    for (auto& a : (C)) n += a * second, second *= first;
    return n;
  }
  Poly& operator+=(const Poly& r) {
    C.resize(max(int((C).size()), int((r.C).size())));
    for (int i = (0); i < (int((r.C).size())); i++) C[i] += r.C[i];
    reduce();
    return *this;
  }
  Poly& operator-=(const Poly& r) {
    C.resize(max(int((C).size()), int((r.C).size())));
    for (int i = (0); i < (int((r.C).size())); i++) C[i] -= r.C[i];
    reduce();
    return *this;
  }
  Poly operator*(const Poly& r) const {
    int len = int((C).size()) + int((r.C).size()) - 1;
    Poly ret;
    ret.C.resize(len);
    if (int((C).size()) * int((r.C).size()) < 200) {
      for (int i = (0); i < (int((C).size())); i++)
        for (int j = (0); j < (int((r.C).size())); j++) {
          ret.C[i + j] = ret.C[i + j] + C[i] * r.C[j];
        }
    } else {
      int n = 1 << (32 - __builtin_clz(len));
      Vfft a(n), b(n);
      for (int i = (0); i < (int((C).size())); i++) a[i] = C[i];
      for (int i = (0); i < (int((r.C).size())); i++) b[i] = r.C[i];
      initFFT(n);
      fft<1>(a);
      fft<1>(b);
      for (int i = (0); i < (int((a).size())); i++) a[i] = a[i] * b[i];
      fft<-1>(a);
      for (int i = (0); i < (len); i++) ret.C[i] = a[i].real();
    }
    ret.reduce();
    return ret;
  }
  Poly operator+(const Poly& r) const {
    Poly l = *this;
    l += r;
    return l;
  }
  Poly operator-(const Poly& r) const {
    Poly l = *this;
    l -= r;
    return l;
  }
  Poly& operator*=(const Poly& r) { return *this = *this * r; }
  void derivate() {
    for (int i = (1); i < (int((C).size())); i++) C[i - 1] = C[i] * i;
    C.pop_back();
  }
  void integrate() {
    C.push_back(0);
    for (int i = (1); i < (int((C).size())); i++) C[i] = C[i - 1] / i;
    C[0] = 0;
  }
};
void run() {
  int n, first;
  cin >> n >> first;
  Vi prefs;
  prefs.push_back(0);
  for (int i = (0); i < (n); i++) {
    int second;
    cin >> second;
    prefs.push_back(prefs.back() + (second < first));
  }
  int size = n * 2;
  Poly P(size), Q(size);
  for (auto& i : (prefs)) {
    P.C[i] += 1;
    Q.C[n - i] += 1;
  }
  Poly res = P * Q;
  Vi seen(n + 1);
  ll zero = 0;
  for (auto& second : (prefs)) {
    zero += seen[second];
    seen[second]++;
  }
  cout << zero << ' ';
  for (int k = (1); k < (n + 1); k++) {
    cout << llround(res.C[k + n]) << ' ';
  }
  cout << endl;
}
