#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char s) { return string(1, s); }
string to_string(const char *s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A>
string to_string(A);
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(A v) {
  bool f = 1;
  string r = "{";
  for (const auto &x : v) {
    if (!f) r += ", ";
    f = 0;
    r += to_string(x);
  }
  return r + "}";
}
void debug_out() { cout << endl; }
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cout << " " << to_string(H);
  debug_out(T...);
}
inline long long add(long long a, long long b) {
  a += b;
  if (a >= MOD) a -= MOD;
  return a;
}
inline long long sub(long long a, long long b) {
  a -= b;
  if (a < 0) a += MOD;
  return a;
}
inline long long mul(long long a, long long b) {
  return (long long)((long long)a * b % MOD);
}
inline long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = mul(res, a);
    a = mul(a, a);
    b /= 2;
  }
  return res;
}
inline long long inv(long long a) { return binpow(a, MOD - 2); }
long long gcd(long long a, long long b, long long &x, long long &y) {
  if (a == 0) {
    x = 0, y = 1;
    return b;
  }
  long long x1, y1;
  long long d = gcd(b % a, a, x1, y1);
  x = y1 - (b / a) * x1;
  y = x1;
  return d;
}
namespace FFT {
const double PI = acos(-1);
void fft(vector<complex<double> > &a, bool invert) {
  long long n = a.size();
  for (long long i = 1, j = 0; i < n; i++) {
    long long bit = n >> 1;
    for (; j & bit; bit >>= 1) j ^= bit;
    j ^= bit;
    if (i < j) swap(a[i], a[j]);
  }
  for (long long len = 2; len <= n; len <<= 1) {
    double ang = 2 * PI / len * (invert ? -1 : 1);
    complex<double> wlen(cos(ang), sin(ang));
    for (long long i = 0, len2 = len / 2; i < n; i += len) {
      complex<double> w(1);
      for (long long j = 0; j < len2; j++) {
        complex<double> u = a[i + j], v = a[i + j + len / 2] * w;
        a[i + j] = u + v;
        a[i + j + len / 2] = u - v;
        w *= wlen;
      }
    }
  }
  if (invert) {
    for (complex<double> &x : a) x /= n;
  }
}
vector<long long> mul(vector<long long> &a, vector<long long> &b) {
  vector<complex<double> > fa(a.begin(), a.end()), fb(b.begin(), b.end());
  long long n = 1;
  while (n < a.size() + b.size()) n <<= 1;
  fa.resize(n), fb.resize(n);
  fft(fa, false);
  fft(fb, false);
  for (long long i = 0; i < n; ++i) fa[i] *= fb[i];
  fft(fa, true);
  vector<long long> ret(n);
  for (long long i = 0; i < n; ++i) ret[i] = (long long)(fa[i].real() + 0.5);
  return ret;
}
}  // namespace FFT
using namespace FFT;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, val;
  cin >> n >> val;
  vector<long long> a(n + 1), prefix(n + 1);
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
    a[i] = (a[i] < val);
    prefix[i] = prefix[i - 1] + a[i];
  }
  vector<long long> pos(n + 1), neg(n + 1), ans(n + 1);
  for (long long i = 0; i <= n; ++i) pos[prefix[i]]++, neg[n - prefix[i]]++;
  vector<long long> res = mul(pos, neg);
  for (long long i = 1; i <= n; ++i) ans[i] = res[i + n];
  for (long long i = 1, cnt = 0; i <= n; ++i) {
    if (a[i] == 0) cnt++;
    if (a[i] == 1 || i == n) {
      ans[0] += cnt * (cnt + 1) / 2;
      cnt = 0;
    }
  }
  for (long long &x : ans) cout << x << " \n"[!(&x - &ans.back())];
  return 0;
}
