#include <bits/stdc++.h>
using namespace std;
using LL = long long;
template <class T>
using min_heap = priority_queue<T, std::vector<T>, std::greater<T>>;
template <class T>
using V = vector<T>;
using LD = long double;
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') {
    cerr << *sdbg++;
  }
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
int bits(int x) {
  int r = 0;
  for (; x; x >>= 1, r++)
    ;
  return r;
}
int reverseBits(int x, int b) {
  int r = 0;
  for (int i = 0; i < b; x >>= 1, ++i) {
    r <<= 1;
    r |= (x & 1);
  }
  return r;
}
const LD PI = acos(-1.0);
using Lf = long double;
using Long = long long;
class Complex {
 public:
  Complex() : r(0.000), i(0.000) {}
  Complex(Lf r, Lf i) : r(r), i(i) {}
  friend Complex operator*(Complex, Complex);
  friend Complex operator*(int, Complex);
  friend Complex operator+(Complex, Complex);
  friend Complex operator-(Complex, Complex);
  friend LL Round(Complex);
  friend Complex operator/(Complex, Lf);
  friend ostream &operator<<(ostream &, const Complex &);

 private:
  Lf r, i;
};
Complex operator*(Complex a, Complex b) {
  return Complex(a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r);
}
Complex operator*(int a, Complex b) { return Complex(a * b.r, a * b.i); }
Complex operator+(Complex a, Complex b) {
  return Complex(a.r + b.r, a.i + b.i);
}
Complex operator-(Complex a, Complex b) {
  return Complex(a.r - b.r, a.i - b.i);
}
LL Round(Complex a) { return round(a.r); }
Complex EXP(Lf theta) { return Complex(cos(theta), sin(theta)); }
Complex operator/(Complex a, Lf b) { return Complex(a.r / b, a.i / b); }
ostream &operator<<(ostream &stream, const Complex &a) {
  stream << '(' << a.r << ',' << a.i << ')';
  return stream;
}
void FFT(V<Complex> &A, int inv) {
  int l = (int)A.size();
  int b = bits(l) - 1;
  auto a = A;
  for (int i = 0; i < l; i++) {
    A[reverseBits(i, b)] = a[i];
  }
  for (int i = 1; i <= b; i++) {
    int m = (1 << i);
    int n = m >> 1;
    auto wn = EXP((Lf)inv * (Lf)2.0 * PI / (Lf)m);
    for (int j = 0; j < l; j += m) {
      Complex w(1.0, 0.0);
      for (int k = j; k < j + n; k++) {
        auto save = w * A[k + n];
        auto t1 = A[k] + save;
        auto t2 = A[k] - save;
        A[k] = t1;
        A[k + n] = t2;
        w = w * wn;
      }
    }
  }
  if (inv == -1) {
    for (auto &i : A) i = i / (Lf)l;
  }
}
V<Long> Convolution(V<Long> &a, V<Long> &b) {
  int tot_size = (int)a.size() + (int)b.size();
  int bit = bits(tot_size);
  int l = 1 << bit;
  V<Complex> A, B, C;
  A.reserve(l);
  B.reserve(l);
  C.reserve(l);
  for (int i = 0; i < l; i++) {
    if (i < (int)a.size())
      A.push_back({(Lf)a[i], 0.0});
    else
      A.push_back({0.0, 0.0});
    if (i < (int)b.size())
      B.push_back({(Lf)b[i], 0.0});
    else
      B.push_back({0.0, 0.0});
  }
  FFT(A, 1);
  FFT(B, 1);
  for (int i = 0; i < l; i++) {
    C.push_back(A[i] * B[i]);
  }
  FFT(C, -1);
  V<Long> c;
  for (auto &i : C) {
    c.push_back(Round(i));
  }
  return c;
}
const int N = (int)1e5 + 10;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (0) cout.tie(NULL);
  int n, x;
  cin >> n >> x;
  vector<int> v(n);
  LL zeros = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    bool value = (a < x);
    v[i] += (i ? v[i - 1] : 0) + value;
    if (value) {
      zeros += (cnt * 1LL * (cnt + 1)) / 2;
      cnt = 0;
    } else {
      cnt++;
    }
  }
  zeros += (cnt * 1LL * (cnt + 1)) / 2;
  vector<Long> a(2 * n + 1, 0), b(2 * n + 1, 0);
  b[n]++;
  for (int i = 0; i < n; i++) {
    a[v[i] + n]++;
    b[-v[i] + n]++;
  }
  auto ans = Convolution(a, b);
  ans[2 * n] = zeros;
  for (int i = 2 * n; i <= 3 * n; i++) {
    cout << ans[i] << " \n"[i == 4 * n];
  }
  if (0)
    cout << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
         << '\n';
  return 0;
}
