#include<bits/stdc++.h>
using namespace std;

#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 6,5,4,3,2,1))
#define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,N,...) N
#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs)
#define macro_dispatcher___(macro, nargs) macro ## nargs
#define Debug1(a)           cout<<#a<<"="<<(a)<<"\n"
#define Debug2(a,b)         cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define Debug3(a,b,c)       cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define Debug4(a,b,c,d)     cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define Debug5(a,b,c,d,e)   cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define Debug6(a,b,c,d,e,f) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define Debug(...) macro_dispatcher(Debug, __VA_ARGS__)(__VA_ARGS__)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"

#define TT1 template<class T>
#define TT1T2 template<class T1, class T2>
#define TT1T2T3 template<class T1, class T2, class T3>
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v);
TT1T2 ostream& operator << (ostream& os, const pair<T1, T2>& p){ return os <<"("<<p.first<<", "<< p.second<<")"; }
TT1 ostream& operator << (ostream& os, const vector<T>& v){       bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v) {     bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const set<T1, T2>&v){    bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multiset<T1,T2>&v){bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2T3 ostream& operator << (ostream& os, const map<T1,T2,T3>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multimap<T1, T2>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, priority_queue<T1, T2> v) { bool f = 1; os << "["; while (!v.empty()) { auto x = v.top(); v.pop(); if (!f) os << ", "; f = 0; os << x; } return os << "]"; }
TT1T2 void printarray(const T1& a, T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) (int)x.size()
#define rep(i, n) for(int i=0;i<n;i++)
#define repp(i, n) for(int i=1;i<=n;i++)
#define all(x) x.begin(), x.end()
#define geti1(X) cin >> X
#define geti2(X,Y) cin >> X >> Y
#define geti3(X,Y,Z) cin >> X >> Y >> Z
#define geti4(X,Y,Z,W) cin >> X >> Y >> Z >> W
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define geti(...) GET_MACRO(__VA_ARGS__, geti4, geti3, geti2, geti1) (__VA_ARGS__)

#define INF 987654321

#define endl '\n'
typedef pair<int,int> pii;
typedef complex<long double> base;

void fft(vector<base> &a, bool invert){
    int n = a.size();
    for(int i=1,j=0;i<n;i++){
        int bit = n >> 1;
        for (;j>=bit;bit>>=1)j -= bit;
        j += bit;
        if (i < j) swap(a[i], a[j]);
    }
    for(int len=2;len<=n;len<<=1){
        long double ang = 2*acos(-1)/len*(invert?-1:1);
        base wlen(cos(ang),sin(ang));
        for(int i=0;i<n;i+=len){
            base w(1);
            for(int j=0;j<len/2;j++){
                base 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(int i=0;i<n;i++) a[i] /= n;
    }
}

void multiply(const vector<ll> &a, const vector<ll> &b, vector<ll> &res){
    vector<base> fa(a.begin(), a.end()), fb(b.begin(),b.end());
    int n = 1;
    while(n < max(a.size(), b.size())) n <<= 1;
    n <<= 1;
    fa.resize(n); fb.resize(n);
    fft(fa,false);fft(fb,false);
    for(int i=0;i<n;i++) fa[i] *= fb[i];
    fft(fa,true);
    res.resize(n);
    for(int i=0;i<n;i++) res[i] = int(fa[i].real() + (fa[i].real() > 0 ? 0.5 : -0.5));
}

int N,X;
ll p[200500], s[200500];
int main(){
	ios::sync_with_stdio(false); cin.tie(NULL);
	geti(N,X);
	repp(i,N){
		int a; geti(a);
		if( a < X ) p[i] = 1;
	}
	int t = 0;
	for(int i=1;i<=N;i++){
		t += p[i];
		s[t]++;
	}
	ll ans0 = 0;
	for(int i=0;i<=N;i++){
		ans0 += s[i] * (s[i]-1) / 2;
	}

	cout << ans0 +s[0] << " ";

	vector<ll> a , b;
	for(int i=0;i<=N;i++){
		a.push_back(s[i]);
		b.push_back(s[i]);
	}
	reverse(all(b));
	rep(i,N) {
		a.pb(0); b.pb(0);
	}

	vector<ll> c;
//	cout << endl ;
//	Debug(a,b,c);
	multiply(a,b,c);
//	Debug(c);
	for(int i=N+1;i<=2*N;i++){
		cout << c[i]+s[i-N] << " ";
	}

}


#include<bits/stdc++.h>
using namespace std;

#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 6,5,4,3,2,1))
#define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,N,...) N
#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs)
#define macro_dispatcher___(macro, nargs) macro ## nargs
#define Debug1(a)           cout<<#a<<"="<<(a)<<"\n"
#define Debug2(a,b)         cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define Debug3(a,b,c)       cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define Debug4(a,b,c,d)     cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define Debug5(a,b,c,d,e)   cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define Debug6(a,b,c,d,e,f) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define Debug(...) macro_dispatcher(Debug, __VA_ARGS__)(__VA_ARGS__)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"

#define TT1 template<class T>
#define TT1T2 template<class T1, class T2>
#define TT1T2T3 template<class T1, class T2, class T3>
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v);
TT1T2 ostream& operator << (ostream& os, const pair<T1, T2>& p){ return os <<"("<<p.first<<", "<< p.second<<")"; }
TT1 ostream& operator << (ostream& os, const vector<T>& v){       bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v) {     bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const set<T1, T2>&v){    bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multiset<T1,T2>&v){bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2T3 ostream& operator << (ostream& os, const map<T1,T2,T3>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multimap<T1, T2>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, priority_queue<T1, T2> v) { bool f = 1; os << "["; while (!v.empty()) { auto x = v.top(); v.pop(); if (!f) os << ", "; f = 0; os << x; } return os << "]"; }
TT1T2 void printarray(const T1& a, T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) (int)x.size()
#define rep(i, n) for(int i=0;i<n;i++)
#define repp(i, n) for(int i=1;i<=n;i++)
#define all(x) x.begin(), x.end()
#define geti1(X) cin >> X
#define geti2(X,Y) cin >> X >> Y
#define geti3(X,Y,Z) cin >> X >> Y >> Z
#define geti4(X,Y,Z,W) cin >> X >> Y >> Z >> W
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define geti(...) GET_MACRO(__VA_ARGS__, geti4, geti3, geti2, geti1) (__VA_ARGS__)

#define INF 987654321

#define endl '\n'
typedef pair<int,int> pii;
typedef complex<double> base;

void fft(vector<base> &a, bool invert){
    int n = a.size();
    for(int i=1,j=0;i<n;i++){
        int bit = n >> 1;
        for (;j>=bit;bit>>=1)j -= bit;
        j += bit;
        if (i < j) swap(a[i], a[j]);
    }
    for(int len=2;len<=n;len<<=1){
        double ang = 2*acos(-1)/len*(invert?-1:1);
        base wlen(cos(ang),sin(ang));
        for(int i=0;i<n;i+=len){
            base w(1);
            for(int j=0;j<len/2;j++){
                base 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(int i=0;i<n;i++) a[i] /= n;
    }
}

void multiply(const vector<ll> &a, const vector<ll> &b, vector<ll> &res){
    vector<base> fa(a.begin(), a.end()), fb(b.begin(),b.end());
    int n = 1;
    while(n < max(a.size(), b.size())) n <<= 1;
    n <<= 1;
    fa.resize(n); fb.resize(n);
    fft(fa,false);fft(fb,false);
    for(int i=0;i<n;i++) fa[i] *= fb[i];
    fft(fa,true);
    res.resize(n);
    for(int i=0;i<n;i++) res[i] = int(fa[i].real() + (fa[i].real() > 0 ? 0.5 : -0.5));
}

int N,X;
ll p[200500], s[200500];
int main(){
	ios::sync_with_stdio(false); cin.tie(NULL);
	geti(N,X);
	repp(i,N){
		int a; geti(a);
		if( a < X ) p[i] = 1;
	}
	int t = 0;
	for(int i=1;i<=N;i++){
		t += p[i];
		s[t]++;
	}
	ll ans0 = 0;
	for(int i=0;i<=N;i++){
		ans0 += s[i] * (s[i]-1) / 2;
	}

	cout << ans0 +s[0] << " ";

	vector<ll> a , b;
	for(int i=0;i<=N;i++){
		a.push_back(s[i]);
		b.push_back(s[i]);
	}
	reverse(all(b));
	rep(i,N) {
		a.pb(0); b.pb(0);
	}

	vector<ll> c;
//	cout << endl ;
//	Debug(a,b,c);
	multiply(a,b,c);
//	Debug(c);
	for(int i=N+1;i<=2*N;i++){
		cout << c[i]+s[i-N] << " ";
	}

}


#include<bits/stdc++.h>
using namespace std;

#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 6,5,4,3,2,1))
#define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,N,...) N
#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs)
#define macro_dispatcher___(macro, nargs) macro ## nargs
#define Debug1(a)           cout<<#a<<"="<<(a)<<"\n"
#define Debug2(a,b)         cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define Debug3(a,b,c)       cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define Debug4(a,b,c,d)     cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define Debug5(a,b,c,d,e)   cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define Debug6(a,b,c,d,e,f) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define Debug(...) macro_dispatcher(Debug, __VA_ARGS__)(__VA_ARGS__)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"

#define TT1 template<class T>
#define TT1T2 template<class T1, class T2>
#define TT1T2T3 template<class T1, class T2, class T3>
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v);
TT1T2 ostream& operator << (ostream& os, const pair<T1, T2>& p){ return os <<"("<<p.first<<", "<< p.second<<")"; }
TT1 ostream& operator << (ostream& os, const vector<T>& v){       bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v) {     bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const set<T1, T2>&v){    bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multiset<T1,T2>&v){bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2T3 ostream& operator << (ostream& os, const map<T1,T2,T3>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multimap<T1, T2>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, priority_queue<T1, T2> v) { bool f = 1; os << "["; while (!v.empty()) { auto x = v.top(); v.pop(); if (!f) os << ", "; f = 0; os << x; } return os << "]"; }
TT1T2 void printarray(const T1& a, T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) (int)x.size()
#define rep(i, n) for(int i=0;i<n;i++)
#define repp(i, n) for(int i=1;i<=n;i++)
#define all(x) x.begin(), x.end()
#define geti1(X) cin >> X
#define geti2(X,Y) cin >> X >> Y
#define geti3(X,Y,Z) cin >> X >> Y >> Z
#define geti4(X,Y,Z,W) cin >> X >> Y >> Z >> W
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define geti(...) GET_MACRO(__VA_ARGS__, geti4, geti3, geti2, geti1) (__VA_ARGS__)

#define INF 987654321

#define endl '\n'
typedef pair<int,int> pii;
typedef complex<double> base;

void fft(vector<base> &a, bool invert){
    int n = a.size();
    for(int i=1,j=0;i<n;i++){
        int bit = n >> 1;
        for (;j>=bit;bit>>=1)j -= bit;
        j += bit;
        if (i < j) swap(a[i], a[j]);
    }
    for(int len=2;len<=n;len<<=1){
        double ang = 2*acos(-1)/len*(invert?-1:1);
        base wlen(cos(ang),sin(ang));
        for(int i=0;i<n;i+=len){
            base w(1);
            for(int j=0;j<len/2;j++){
                base 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(int i=0;i<n;i++) a[i] /= n;
    }
}

void multiply(const vector<ll> &a, const vector<ll> &b, vector<ll> &res){
    vector<base> fa(a.begin(), a.end()), fb(b.begin(),b.end());
    int n = 1;
    while(n < max(a.size(), b.size())) n <<= 1;
    n <<= 1;
    fa.resize(n); fb.resize(n);
    fft(fa,false);fft(fb,false);
    for(int i=0;i<n;i++) fa[i] *= fb[i];
    fft(fa,true);
    res.resize(n);
    for(int i=0;i<n;i++) res[i] = ll(fa[i].real() + (fa[i].real() > 0 ? 0.5 : -0.5));
}

int N,X;
ll p[200500], s[200500];
int main(){
	ios::sync_with_stdio(false); cin.tie(NULL);
	geti(N,X);
	repp(i,N){
		int a; geti(a);
		if( a < X ) p[i] = 1;
	}
	int t = 0;
	for(int i=1;i<=N;i++){
		t += p[i];
		s[t]++;
	}
	ll ans0 = 0;
	for(int i=0;i<=N;i++){
		ans0 += s[i] * (s[i]-1) / 2;
	}

	cout << ans0 +s[0] << " ";

	vector<ll> a , b;
	for(int i=0;i<=N;i++){
		a.push_back(s[i]);
		b.push_back(s[i]);
	}
	reverse(all(b));
	rep(i,N) {
		a.pb(0); b.pb(0);
	}

	vector<ll> c;
//	cout << endl ;
//	Debug(a,b,c);
	multiply(a,b,c);
//	Debug(c);
	for(int i=N+1;i<=2*N;i++){
		cout << c[i]+s[i-N] << " ";
	}

}


#include<bits/stdc++.h>
using namespace std;

#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 6,5,4,3,2,1))
#define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,N,...) N
#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs)
#define macro_dispatcher___(macro, nargs) macro ## nargs
#define Debug1(a)           cout<<#a<<"="<<(a)<<"\n"
#define Debug2(a,b)         cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define Debug3(a,b,c)       cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define Debug4(a,b,c,d)     cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define Debug5(a,b,c,d,e)   cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define Debug6(a,b,c,d,e,f) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define Debug(...) macro_dispatcher(Debug, __VA_ARGS__)(__VA_ARGS__)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"

#define TT1 template<class T>
#define TT1T2 template<class T1, class T2>
#define TT1T2T3 template<class T1, class T2, class T3>
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v);
TT1T2 ostream& operator << (ostream& os, const pair<T1, T2>& p){ return os <<"("<<p.first<<", "<< p.second<<")"; }
TT1 ostream& operator << (ostream& os, const vector<T>& v){       bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v) {     bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const set<T1, T2>&v){    bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multiset<T1,T2>&v){bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2T3 ostream& operator << (ostream& os, const map<T1,T2,T3>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multimap<T1, T2>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, priority_queue<T1, T2> v) { bool f = 1; os << "["; while (!v.empty()) { auto x = v.top(); v.pop(); if (!f) os << ", "; f = 0; os << x; } return os << "]"; }
TT1T2 void printarray(const T1& a, T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) (int)x.size()
#define rep(i, n) for(int i=0;i<n;i++)
#define repp(i, n) for(int i=1;i<=n;i++)
#define all(x) x.begin(), x.end()
#define geti1(X) cin >> X
#define geti2(X,Y) cin >> X >> Y
#define geti3(X,Y,Z) cin >> X >> Y >> Z
#define geti4(X,Y,Z,W) cin >> X >> Y >> Z >> W
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define geti(...) GET_MACRO(__VA_ARGS__, geti4, geti3, geti2, geti1) (__VA_ARGS__)

#define INF 987654321

#define endl '\n'
typedef pair<int,int> pii;
typedef complex<long double> base;

void fft(vector<base> &a, bool invert){
    int n = a.size();
    for(int i=1,j=0;i<n;i++){
        int bit = n >> 1;
        for (;j>=bit;bit>>=1)j -= bit;
        j += bit;
        if (i < j) swap(a[i], a[j]);
    }
    for(int len=2;len<=n;len<<=1){
        long double ang = 2*acos(-1)/len*(invert?-1:1);
        base wlen(cos(ang),sin(ang));
        for(int i=0;i<n;i+=len){
            base w(1);
            for(int j=0;j<len/2;j++){
                base 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(int i=0;i<n;i++) a[i] /= n;
    }
}

void multiply(const vector<ll> &a, const vector<ll> &b, vector<ll> &res){
    vector<base> fa(a.begin(), a.end()), fb(b.begin(),b.end());
    int n = 1;
    while(n < max(a.size(), b.size())) n <<= 1;
    n <<= 1;
    fa.resize(n); fb.resize(n);
    fft(fa,false);fft(fb,false);
    for(int i=0;i<n;i++) fa[i] *= fb[i];
    fft(fa,true);
    res.resize(n);
    for(int i=0;i<n;i++) res[i] = (ll)(fa[i].real() + (fa[i].real() > 0 ? 0.5 : -0.5));
}

int N,X;
ll p[200500], s[200500];
int main(){
	ios::sync_with_stdio(false); cin.tie(NULL);
	geti(N,X);
	repp(i,N){
		int a; geti(a);
		if( a < X ) p[i] = 1;
	}
	int t = 0;
	for(int i=1;i<=N;i++){
		t += p[i];
		s[t]++;
	}
	ll ans0 = 0;
	for(int i=0;i<=N;i++){
		ans0 += s[i] * (s[i]-1) / 2;
	}

	cout << ans0 +s[0] << " ";

	vector<ll> a , b;
	for(int i=0;i<=N;i++){
		a.push_back(s[i]);
		b.push_back(s[i]);
	}
	reverse(all(b));
	rep(i,N) {
		a.pb(0); b.pb(0);
	}

	vector<ll> c;
//	cout << endl ;
//	Debug(a,b,c);
	multiply(a,b,c);
//	Debug(c);
	for(int i=N+1;i<=2*N;i++){
		cout << c[i]+s[i-N] << " ";
	}

}


#include<bits/stdc++.h>
using namespace std;

#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 6,5,4,3,2,1))
#define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,N,...) N
#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs)
#define macro_dispatcher___(macro, nargs) macro ## nargs
#define Debug1(a)           cout<<#a<<"="<<(a)<<"\n"
#define Debug2(a,b)         cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define Debug3(a,b,c)       cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define Debug4(a,b,c,d)     cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define Debug5(a,b,c,d,e)   cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define Debug6(a,b,c,d,e,f) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define Debug(...) macro_dispatcher(Debug, __VA_ARGS__)(__VA_ARGS__)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"

#define TT1 template<class T>
#define TT1T2 template<class T1, class T2>
#define TT1T2T3 template<class T1, class T2, class T3>
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v);
TT1T2 ostream& operator << (ostream& os, const pair<T1, T2>& p){ return os <<"("<<p.first<<", "<< p.second<<")"; }
TT1 ostream& operator << (ostream& os, const vector<T>& v){       bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v) {     bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const set<T1, T2>&v){    bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multiset<T1,T2>&v){bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2T3 ostream& operator << (ostream& os, const map<T1,T2,T3>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multimap<T1, T2>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, priority_queue<T1, T2> v) { bool f = 1; os << "["; while (!v.empty()) { auto x = v.top(); v.pop(); if (!f) os << ", "; f = 0; os << x; } return os << "]"; }
TT1T2 void printarray(const T1& a, T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) (int)x.size()
#define rep(i, n) for(int i=0;i<n;i++)
#define repp(i, n) for(int i=1;i<=n;i++)
#define all(x) x.begin(), x.end()
#define geti1(X) cin >> X
#define geti2(X,Y) cin >> X >> Y
#define geti3(X,Y,Z) cin >> X >> Y >> Z
#define geti4(X,Y,Z,W) cin >> X >> Y >> Z >> W
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define geti(...) GET_MACRO(__VA_ARGS__, geti4, geti3, geti2, geti1) (__VA_ARGS__)

#define INF 987654321

#define endl '\n'
typedef pair<int,int> pii;
typedef complex<double> base;

void fft(vector<base> &a, bool invert){
    int n = a.size();
    for(int i=1,j=0;i<n;i++){
        int bit = n >> 1;
        for (;j>=bit;bit>>=1)j -= bit;
        j += bit;
        if (i < j) swap(a[i], a[j]);
    }
    for(int len=2;len<=n;len<<=1){
        double ang = 2*acos(-1)/len*(invert?-1:1);
        base wlen(cos(ang),sin(ang));
        for(int i=0;i<n;i+=len){
            base w(1);
            for(int j=0;j<len/2;j++){
                base 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(int i=0;i<n;i++) a[i] /= n;
    }
}

void multiply(const vector<ll> &a, const vector<ll> &b, vector<ll> &res){
    vector<base> fa(a.begin(), a.end()), fb(b.begin(),b.end());
    int n = 1;
    while(n < max(a.size(), b.size())) n <<= 1;
    n <<= 1;
    fa.resize(n); fb.resize(n);
    fft(fa,false);fft(fb,false);
    for(int i=0;i<n;i++) fa[i] *= fb[i];
    fft(fa,true);
    res.resize(n);
    for(int i=0;i<n;i++) res[i] = int(fa[i].real() + (fa[i].real() > 0 ? 0.5 : -0.5));
}

int N,X;
int p[200500], s[200500];
int main(){
	ios::sync_with_stdio(false); cin.tie(NULL);
	geti(N,X);
	repp(i,N){
		int a; geti(a);
		if( a < X ) p[i] = 1;
	}
	int t = 0;
	for(int i=1;i<=N;i++){
		t += p[i];
		s[t]++;
	}
	ll ans0 = 0;
	for(int i=0;i<=N;i++){
		ans0 += s[i] * (s[i]-1) / 2;
	}

	cout << ans0 << " ";

	vector<ll> a , b;
	for(int i=0;i<=N;i++){
		a.push_back(s[i]);
		b.push_back(s[i]);
	}
	reverse(all(b));
	rep(i,N) {
		a.pb(0); b.pb(0);
	}

	vector<ll> c;
//	cout << endl ;
//	Debug(a,b,c);
	multiply(a,b,c);
//	Debug(c);
	for(int i=N+1;i<=2*N;i++){
		cout << c[i]+s[i-N] << " ";
	}

}


#include<bits/stdc++.h>
using namespace std;

#define VA_NUM_ARGS(...) VA_NUM_ARGS_IMPL_((0,__VA_ARGS__, 6,5,4,3,2,1))
#define VA_NUM_ARGS_IMPL_(tuple) VA_NUM_ARGS_IMPL tuple
#define VA_NUM_ARGS_IMPL(_0,_1,_2,_3,_4,_5,_6,N,...) N
#define macro_dispatcher(macro, ...) macro_dispatcher_(macro, VA_NUM_ARGS(__VA_ARGS__))
#define macro_dispatcher_(macro, nargs) macro_dispatcher__(macro, nargs)
#define macro_dispatcher__(macro, nargs) macro_dispatcher___(macro, nargs)
#define macro_dispatcher___(macro, nargs) macro ## nargs
#define Debug1(a)           cout<<#a<<"="<<(a)<<"\n"
#define Debug2(a,b)         cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<"\n"
#define Debug3(a,b,c)       cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<"\n"
#define Debug4(a,b,c,d)     cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<"\n"
#define Debug5(a,b,c,d,e)   cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<"\n"
#define Debug6(a,b,c,d,e,f) cout<<#a<<"="<<(a)<<", "<<#b<<"="<<(b)<<", "<<#c<<"="<<(c)<<", "<<#d<<"="<<(d)<<", "<<#e<<"="<<(e)<<", "<<#f<<"="<<(f)<<"\n"
#define Debug(...) macro_dispatcher(Debug, __VA_ARGS__)(__VA_ARGS__)
#define DA(a,n) cout<<#a<<"=["; printarray(a,n); cout<<"]\n"
#define DAR(a,n,s) cout<<#a<<"["<<s<<"-"<<n-1<<"]=["; printarray(a,n,s); cout<<"]\n"

#define TT1 template<class T>
#define TT1T2 template<class T1, class T2>
#define TT1T2T3 template<class T1, class T2, class T3>
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v);
TT1T2 ostream& operator << (ostream& os, const pair<T1, T2>& p){ return os <<"("<<p.first<<", "<< p.second<<")"; }
TT1 ostream& operator << (ostream& os, const vector<T>& v){       bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
template<class T, size_t N> ostream& operator << (ostream& os, const array<T, N>& v) {     bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const set<T1, T2>&v){    bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multiset<T1,T2>&v){bool f=1;os<<"[";for(auto& i : v) { if (!f)os << ", ";os<<i;f=0;}return os << "]"; }
TT1T2T3 ostream& operator << (ostream& os, const map<T1,T2,T3>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, const multimap<T1, T2>& v){ bool f = 1; os << "["; for (auto& ii : v) { if (!f)os << ", "; os << "(" << ii.first << " -> " << ii.second << ") "; f = 0; }return os << "]"; }
TT1T2 ostream& operator << (ostream& os, priority_queue<T1, T2> v) { bool f = 1; os << "["; while (!v.empty()) { auto x = v.top(); v.pop(); if (!f) os << ", "; f = 0; os << x; } return os << "]"; }
TT1T2 void printarray(const T1& a, T2 sz, T2 beg = 0){ for (T2 i = beg; i<sz; i++) cout << a[i] << " "; cout << endl; }

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> Pi;
typedef pair<ll, ll> Pll;

#define Fi first
#define Se second
#define pb(x) push_back(x)
#define sz(x) (int)x.size()
#define rep(i, n) for(int i=0;i<n;i++)
#define repp(i, n) for(int i=1;i<=n;i++)
#define all(x) x.begin(), x.end()
#define geti1(X) cin >> X
#define geti2(X,Y) cin >> X >> Y
#define geti3(X,Y,Z) cin >> X >> Y >> Z
#define geti4(X,Y,Z,W) cin >> X >> Y >> Z >> W
#define GET_MACRO(_1,_2,_3,_4,NAME,...) NAME
#define geti(...) GET_MACRO(__VA_ARGS__, geti4, geti3, geti2, geti1) (__VA_ARGS__)

#define INF 987654321

#define endl '\n'
typedef pair<int,int> pii;
typedef complex<double> base;

void fft(vector<base> &a, bool invert){
    int n = a.size();
    for(int i=1,j=0;i<n;i++){
        int bit = n >> 1;
        for (;j>=bit;bit>>=1)j -= bit;
        j += bit;
        if (i < j) swap(a[i], a[j]);
    }
    for(int len=2;len<=n;len<<=1){
        double ang = 2*acos(-1)/len*(invert?-1:1);
        base wlen(cos(ang),sin(ang));
        for(int i=0;i<n;i+=len){
            base w(1);
            for(int j=0;j<len/2;j++){
                base 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(int i=0;i<n;i++) a[i] /= n;
    }
}

void multiply(const vector<ll> &a, const vector<ll> &b, vector<ll> &res){
    vector<base> fa(a.begin(), a.end()), fb(b.begin(),b.end());
    int n = 1;
    while(n < max(a.size(), b.size())) n <<= 1;
    n <<= 1;
    fa.resize(n); fb.resize(n);
    fft(fa,false);fft(fb,false);
    for(int i=0;i<n;i++) fa[i] *= fb[i];
    fft(fa,true);
    res.resize(n);
    for(int i=0;i<n;i++) res[i] = int(fa[i].real() + (fa[i].real() > 0 ? 0.5 : -0.5));
}

int N,X;
int p[200500], s[200500];
int main(){
	ios::sync_with_stdio(false); cin.tie(NULL);
	geti(N,X);
	repp(i,N){
		int a; geti(a);
		if( a < X ) p[i] = 1;
	}
	int t = 0;
	for(int i=1;i<=N;i++){
		t += p[i];
		s[t]++;
	}
	ll ans0 = 0;
	for(int i=0;i<=N;i++){
		ans0 += s[i] * (s[i]-1) / 2;
	}

	cout << ans0 +s[0] << " ";

	vector<ll> a , b;
	for(int i=0;i<=N;i++){
		a.push_back(s[i]);
		b.push_back(s[i]);
	}
	reverse(all(b));
	rep(i,N) {
		a.pb(0); b.pb(0);
	}

	vector<ll> c;
//	cout << endl ;
//	Debug(a,b,c);
	multiply(a,b,c);
//	Debug(c);
	for(int i=N+1;i<=2*N;i++){
		cout << c[i]+s[i-N] << " ";
	}

}


#include <bits/stdc++.h>

using namespace std;
#define ll long long
#define ld float

const ll N = 1e6 + 5, K = 25;
using cd = complex<double>;
const double PI = acos(-1);

ll reverse(ll num, ll lg_n) {
    ll res = 0;
    for (ll i = 0; i < lg_n; i++) {
        if (num & (1 << i))
            res |= 1 << (lg_n - 1 - i);
    }
    return res;
}

void fft(vector<cd> &a, bool invert) {
    ll n = a.size();
    ll lg_n = 0;
    while ((1 << lg_n) < n)
        lg_n++;

    for (ll i = 0; i < n; i++) {
        if (i < reverse(i, lg_n))
            swap(a[i], a[reverse(i, lg_n)]);
    }

    for (ll len = 2; len <= n; len <<= 1) {
        double ang = 2 * PI / len * (invert ? -1 : 1);
        cd wlen(cos(ang), sin(ang));
        for (ll i = 0; i < n; i += len) {
            cd w(1);
            for (ll j = 0; j < len / 2; j++) {
                cd 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 (cd &x : a)
            x /= n;
    }
}

vector<ll> multiply(vector<ll> const &a, vector<ll> const &b) {
    vector<cd> fa(a.begin(), a.end()), fb(b.begin(), b.end());
    ll n = 1;
    while (n < a.size() + b.size())
        n <<= 1;
    fa.resize(n);
    fb.resize(n);

    fft(fa, false);
    fft(fb, false);
    for (ll i = 0; i < n; i++)
        fa[i] *= fb[i];
    fft(fa, true);

    vector<ll> result(n);
    for (ll i = 0; i < n; i++)
        result[i] = round(fa[i].real());
    return result;
}

ll ans[N];

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    ll n, x;
    cin >> n >> x;
    vector<ll> A(n + 1), B(2 * n + 1);
    A[0] = B[0 + 2 * n] = 1;
    ll cur = 0, lstCur = -2e9, cnt = 0;
    for (ll i = 0; i < n; i++) {
        ll a;
        cin >> a;
        if (a < x) cur++;
        A[cur]++;
        B[-cur + 2 * n]++;
        if (cur == lstCur) {
            cnt++;
        } else {
            cnt--;
            ans[0] += cnt * 1LL * (cnt + 1) / 2;
            cnt = 1;
        }
        lstCur = cur;
    }
    cnt--;
    ans[0] += cnt * 1LL * (cnt + 1) / 2;
    vector<ll> C = multiply(A, B);
//    for(ll i = 0 ; i < C.size() ; i++) {
//        cout << i <<' ' << C[i] << endl;
//    }
    for(ll i = 2 * n + 1; i < C.size() ; i++) {
        ans[i - 2 * n] = C[i];
    }
    for(ll i = 0 ; i <= n  ; i++)
        cout << ans[i] <<' ' ;
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
#define ll long long
#define ld float

const ll N = 1e6 + 5, K = 25;
using cd = complex<double>;
const double PI = acos(-1);

ll reverse(ll num, ll lg_n) {
    ll res = 0;
    for (ll i = 0; i < lg_n; i++) {
        if (num & (1 << i))
            res |= 1 << (lg_n - 1 - i);
    }
    return res;
}

void fft(vector<cd> &a, bool invert) {
    ll n = a.size();
    ll lg_n = 0;
    while ((1 << lg_n) < n)
        lg_n++;

    for (ll i = 0; i < n; i++) {
        if (i < reverse(i, lg_n))
            swap(a[i], a[reverse(i, lg_n)]);
    }

    for (ll len = 2; len <= n; len <<= 1) {
        double ang = 2 * PI / len * (invert ? -1 : 1);
        cd wlen(cos(ang), sin(ang));
        for (ll i = 0; i < n; i += len) {
            cd w(1);
            for (ll j = 0; j < len / 2; j++) {
                cd 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 (cd &x : a)
            x /= n;
    }
}

vector<ll> multiply(vector<ll> const &a, vector<ll> const &b) {
    vector<cd> fa(a.begin(), a.end()), fb(b.begin(), b.end());
    ll n = 1;
    while (n < a.size() + b.size())
        n <<= 1;
    fa.resize(n);
    fb.resize(n);

    fft(fa, false);
    fft(fb, false);
    for (ll i = 0; i < n; i++)
        fa[i] *= fb[i];
    fft(fa, true);

    vector<ll> result(n);
    for (ll i = 0; i < n; i++)
        result[i] = round(fa[i].real());
    return result;
}

ll ans[N];

int main() {
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    ll n, x;
    cin >> n >> x;
    vector<ll> A(n + 1), B(2 * n + 1);
    A[0] = B[0 + 2 * n] = 1;
    ll cur = 0, lstCur = -2e9, cnt = 0;
    for (ll i = 0; i < n; i++) {
        ll a;
        cin >> a;
        if (a < x) cur++;
        A[cur]++;
        B[-cur + 2 * n]++;
        if (a >= x) {
            cnt++;
        } else {
            ans[0] += cnt * 1LL * (cnt + 1) / 2;
            cnt = 0;
        }
        lstCur = cur;
    }
    ans[0] += cnt * 1LL * (cnt + 1) / 2;
    vector<ll> C = multiply(A, B);
//    for(ll i = 0 ; i < C.size() ; i++) {
//        cout << i <<' ' << C[i] << endl;
//    }
    for(ll i = 2 * n + 1; i < C.size() ; i++) {
        ans[i - 2 * n] = C[i];
    }
    for(ll i = 0 ; i <= n  ; i++)
        cout << ans[i] <<' ' ;
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;
#define debarr(a,n) cout<<#a<<" : ";for(int i=0;i<n;i++) cerr<<a[i]<<" "; cerr<<endl;
#define debmat(mat,row,col) cout<<#mat<<" :\n";for(int i=0;i<row;i++) {for(int j=0;j<col;j++) cerr<<mat[i][j]<<" ";cerr<<endl;}
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const unordered_set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const unordered_map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const multiset<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
lli binpow(lli b,lli p,lli mod){lli ans=1;for(;p;p>>=1){if(p&1)ans=ans*b%mod;b=b*b%mod;}return ans;}

void pre(){

}

namespace myfft{
    struct base{
	    ld x,y;
	    base(){x=y=0;}
	    base(ld _x, ld _y){x = _x,y = _y;}
	    base(ld _x){x = _x, y = 0;}
	    void operator = (ld _x){x = _x,y = 0;}
	    ld real(){return x;}
	    ld imag(){return y;}
	    base operator + (const base& b){return base(x+b.x,y+b.y);}
	    void operator += (const base& b){x+=b.x,y+=b.y;}
	    base operator * (const base& b){return base(x*b.x - y*b.y,x*b.y+y*b.x);}
	    void operator *= (const base& b){ld p = x*b.x - y*b.y, q = x*b.y+y*b.x; x = p, y = q;}
	    void operator /= (ld k){x/=k,y/=k;}
	    base operator - (const base& b){return base(x - b.x,y - b.y);}
	    void operator -= (const base& b){x -= b.x, y -= b.y;}
	    base conj(){ return base(x, -y);}
	    base operator / (ld k) { return base(x / k, y / k);}
	};
	double PI = 2.0*acos(0.0);
	const int MAXN = 21;
	const int maxn = (1<<MAXN);
	base W[maxn],invW[maxn], P1[maxn], Q1[maxn];
	void precompute_powers(){
	    for(int i = 0;i<maxn/2;i++){
	        double ang = (2*PI*i)/maxn;
	        ld _cos = cos(ang), _sin = sin(ang);
	        W[i] = base(_cos,_sin);
	        invW[i] = base(_cos,-_sin);
	    }
	}
	void fft (vector<base> & a, bool invert) {
	    int n = (int) a.size();

	    for (int i=1, j=0; i<n; ++i) {
	        int bit = n >> 1;
	        for (; j>=bit; bit>>=1)
	            j -= bit;
	        j += bit;
	        if (i < j)
	            swap (a[i], a[j]);
	    }
	    for (int len=2; len<=n; len<<=1) {
	        for (int i=0; i<n; i+=len) {
	            int ind = 0,add = maxn/len;
	            for (int j=0; j<len/2; ++j) {
	                base u = a[i+j],  v = (a[i+j+len/2] * (invert?invW[ind]:W[ind]));
	                a[i+j] = (u + v);
	                a[i+j+len/2] = (u - v);
	                ind += add;
	            }
	        }
	    }
	    if (invert) for (int i=0; i<n; ++i) a[i] /= n;
	}
	// In case of precision issues change vi to vi
	void multiply(vi &a, vi & b, lli mod){
	    int n1 = a.size(),n2 = b.size();
	    int final_size = a.size() + b.size() - 1;
	    int n = 1;
	    while(n < final_size) n <<= 1;
	    vector<base> P(n), Q(n);
	    int SQRTMOD = (int)sqrt(mod) + 10;
	    for(int i = 0;i < n1;i++) P[i] = base(a[i] % SQRTMOD, a[i] / SQRTMOD);
	    for(int i = 0;i < n2;i++) Q[i] = base(b[i] % SQRTMOD, b[i] / SQRTMOD);
	    fft(P, 0);
	    fft(Q, 0);
	    base A1, A2, B1, B2, X, Y;
	    for(int i = 0; i < n; i++){
	        X = P[i];
	        Y = P[(n - i) % n].conj();
	        A1 = (X + Y) * base(0.5, 0);
	        A2 = (X - Y) * base(0, -0.5);
	        X = Q[i];
	        Y = Q[(n - i) % n].conj();
	        B1 = (X + Y) * base(0.5, 0);
	        B2 = (X - Y) * base(0, -0.5);
	        P1[i] = A1 * B1 + A2 * B2 * base(0, 1);
	        Q1[i] = A1 * B2 + A2 * B1;
	    }
	    for(int i = 0; i < n; i++) P[i] = P1[i], Q[i] = Q1[i];
	    fft(P, 1);
	    fft(Q, 1);
	    a.resize(final_size);
	    for(int i = 0; i < final_size; i++){
	        lli x = (lli)(P[i].real() + 0.5);
	        lli y = (lli)(P[i].imag() + 0.5) % mod;
	        lli z = (lli)(Q[i].real() + 0.5);
	        a[i] = (x + ((y * SQRTMOD + z) % mod) * SQRTMOD) % mod;
	    }
	}
    const lli mod = 1e9+7;
}

void solve(){
	lli n,x;
	cin>>n>>x;
	lli arr[n];
	fr(i,n)cin>>arr[i];
	vi s(n+1);
	s[0]=0;
	rep(i,0,n-1){
		s[i+1]=s[i]+(arr[i]<x);
	}
	pr(s);
	vi r(n+1,0);
	fr(i,n+1){
		r[s[i]]++;
	}
	vi v(n+1,0);
	fr(i,n+1){
		v[i]=r[n-i];
	}
	pr(r,v);
	myfft::precompute_powers();
	myfft::multiply(r,v,MOD*400);
	pr(r);
	int ans[n+1];
	rep(i,1,n){
		ans[i]=r[i+n];
	}
	ans[0]=0;
	int cnt=0;
	for(int i=0;i<n;i++){
		if(arr[i]<x){
			ans[0]+=cnt*(cnt+1)/2;
			cnt=0;
		}
		else{
			cnt++;
		}
	}
	ans[0]+=cnt*(cnt+1)/2;
	cnt=0;
	fr(i,n+1){
		cout<<ans[i]<<" ";
	}
}

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	pre();
	int t=1;
	//cin>>t;
	for(int i=1;i<=t;i++){
		//cout<<"Case #"<<i<<": ";
		solve();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;
#define debarr(a,n) cout<<#a<<" : ";for(int i=0;i<n;i++) cerr<<a[i]<<" "; cerr<<endl;
#define debmat(mat,row,col) cout<<#mat<<" :\n";for(int i=0;i<row;i++) {for(int j=0;j<col;j++) cerr<<mat[i][j]<<" ";cerr<<endl;}
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const unordered_set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const unordered_map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const multiset<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
lli binpow(lli b,lli p,lli mod){lli ans=1;for(;p;p>>=1){if(p&1)ans=ans*b%mod;b=b*b%mod;}return ans;}

void pre(){

}

#define vii vector<pii>
#define vi vi
#define eb emplace_back
lli powr(lli a, lli b, lli mod)
{
    lli x = 1%mod;
    a %= mod;
    while(b)
    {
        if(b&1)
            x = (x*a)%mod;
        a = (a*a)%mod;
        b >>= 1;
    }
    return x;
}
lli inv(lli a, lli mod)
{
    return powr(a,mod-2,mod);
}

const int maxn = 1e6+10;

void mul_naive(vi& a, vi& b)
{
    vi c(a.size()+b.size()-1);
    for(int i = 0;i<a.size();i++)
        for(int j = 0;j<b.size();j++)
            c[i+j]+=a[i]*b[j];
    a = c;
}

class NTT{
    /* Using NTT for multiplication of polynomials:

     p1 and p2 are primes of form k* 2^21 + 1, and g1 and g2 are their primitive roots respectively.
     These are selected such that they are close to 10^9. NTT is
     applied modulo both primes and then CRT is used, to get precise result(p1*p2 is assumed to
     greater than alli coefficients of the resulting polynomial. )

     p1 = 463470593
     g1 = 3
     p2 = 469762049
     g2 = 3
     inv1 = p1^-1 (mod p2) = 313174774
     inv2 = p2^-1 (mod p1) = 154490124
    */

    lli p,g,n,logn;
public:
    NTT(lli P, lli G, lli LOGN)
    {
        p = P;
        lli g1 = G;
        logn = LOGN;
        n = (1<<LOGN);
        assert((p-1)%n == 0);
        // p = k*n + 1;
        // We need g = g1^k, so that the order of g wrt p is n.
        g = powr(g1,(p-1)>>logn,p);
    }

    int bitrevcopy(int i)// create bitreversed copy of i.
    {
        int ret = 0;
        for(int j = 0;j<logn;j++)
            if(i&(1<<j))
                ret|=(1<<(logn-1-j));
        return ret;
    }
    void fft(vi& a, bool invert) // Use fast fourier transform to find polynomial values at g^i,0<=i<n
    {
        lli mod = p;
        for(int i = 0;i<n;i++)
        {
            int br = bitrevcopy(i);
            if(i<br)
                swap(a[i],a[br]);
        }
        for(int i = 1;i<=logn;i++)
        {
            lli mul = powr(g,1<<(logn-i),p);
            if(invert)
                mul = inv(mul,p);
            int add = (1<<i);
            for(int k = 0;k<n;k+=add)
            {
                lli w = 1;
                lli lim = (add>>1);
                for(int j = 0;j<lim;j++)
                {
                    lli u = (w*a[k+j+lim])%p, v = a[k+j];
                    a[k+j] = u+v;
                    if(a[k+j]>=p)
                        a[k+j] -= p;
                    a[k+j+lim] = v-u;
                    if(a[k+j+lim]<0)
                        a[k+j+lim]+=p;
                    w = (w*mul)%p;
                }
            }
        }
        if(invert){
            lli _inv = inv(n,p);
            for(int i = 0;i<n;i++){
                a[i] = (a[i]*_inv)%p;
            }
        }
    }
};

lli mulmod(lli a, lli b, lli mod){
    if(a == 0 || b == 0)
        return 0;
    if(b <= 4e18/a)
        return (a*b)%mod;
    lli b1 = b/4,b2=b-4*b1;
    // a*(4*b1+b2)
    return (a*b2 + 4*mulmod(a,b1,mod))%mod;
}
void NTT_mul(vi& a, vi& B) // Works precisely if every coefficient of resulting polynomial is < p1*p2.
{
    // lli p1 = 463470593,g1 = 3,p2 = 469762049,g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    /*
       p          g
    635437057     11
    639631361     6
    645922817     3
    648019969     17
    666894337     5
    683671553     3
    710934529     17
    715128833     3
    740294657     3
    754974721     11
    786432001     7
    799014913     13
    824180737     5
    880803841     26
    897581057     3
    899678209     7
    918552577     5
    924844033     5
    935329793     3
    943718401     7
    950009857     7
    962592769     7
    975175681     17
    985661441     3
    998244353     3
    */
    vi b = B;
    lli p1 = 998244353 ,g1 = 3,p2 = 985661441 , g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    lli mul1 = (p1*inv1)%(p1*p2) ,mul2 =(p2*inv2)%(p1*p2);
    int _sz = a.size()+b.size()-1;
    int LOGN = 0;
    while((1<<LOGN) < _sz)LOGN++;
    lli N = (1<<LOGN);
    a.resize(N);
    b.resize(N);
    vi a1 = a,b1 = b;
    NTT fft1 = NTT(p1,g1,LOGN);
    NTT fft2 = NTT(p2,g2,LOGN);
    fft1.fft(a,false);
    fft1.fft(b,false);
    fft2.fft(a1,false);
    fft2.fft(b1,false);
    for(int i = 0;i<N;i++){
        a[i] = (a[i]*b[i])%p1;
        a1[i] = (a1[i]*b1[i])%p2;
    }
    fft1.fft(a,true);
    fft2.fft(a1,true);
    lli md = p1*p2;
    a.resize(_sz);
    for(int i = 0;i<_sz;i++){
        a[i] = (mulmod(mul1,a1[i],md)+mulmod(mul2,a[i],md))%(md);
    }
}
#define VI vector <ld>
typedef complex<double> base;
double PI = 2.0*acos(0.0);
void fft(vector<base> & a, bool invert) {
    int n = (int) a.size();
    for (int i=1, j=0; i<n; ++i) {
        int bit = n >> 1;
        for (; j>=bit; bit>>=1)
            j -= bit;
        j += bit;
        if (i < j)
            swap (a[i], a[j]);
    }
    for (int len=2; len<=n; len<<=1) {
        double ang = 2*PI/len * (invert ? -1 : 1);
        base wlen (cos(ang), sin(ang));
        for (int i=0; i<n; i+=len) {
            base w (1);
            for (int j=0; j<len/2; ++j) {
                base 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 (int i=0; i<n; ++i)
            a[i] /= n;
}

void multiply ( vi & a, vi & B) {
    vi b = B;
    vector<base> fa(a.begin(),a.end()),fb(b.begin(),b.end());
    int n = 1;
    while (n < max(a.size(),b.size()))n<<=1;n<<=1;
    fa.resize (n),fb.resize(n);
    fft(fa, false),fft(fb, false);
    for(size_t i=0;i<n; ++i)fa[i] *= fb[i];
    fft(fa, true);
    a.resize(n);
    for (size_t i=0;i<a.size(); ++i)
        a[i]=((lli)(fa[i].real()+0.5));
}

void polymulmod(vi& a, vi& b, bool takemod, lli mod, bool give_a_fuck_about_precision){
    int sa=a.size(),sb=b.size();
    if(sa*1ll*sb <= 100000)mul_naive(a,b);
    else if(!give_a_fuck_about_precision)multiply(a,b);
    else NTT_mul(a,b);
    if(takemod)for(int i = 0;i<a.size();i++)a[i]%=mod;
}
const lli mod = 13313;
vi polymul(vector<vi>& X, int k){
    if(X.empty()){
        vi ret;
        ret.eb(1);
        return ret;
    }
    if(X.size()==1)
        return X[0];
    int k1 = (X.size()>>1);
    vector<vi> v1(X.begin(),X.begin()+k1);
    vector<vi> v2(X.begin()+k1,X.end());
    vi V1 = polymul(v1,k),V2 = polymul(v2,k);
    polymulmod(V1,V2,1,mod,1);
    V1.resize(min((int)V1.size(),k+1));
    return V1;
}

void solve(){
    lli n,x;
    cin>>n>>x;
    lli arr[n];
    fr(i,n)cin>>arr[i];
    vi s(n+1);
    s[0]=0;
    rep(i,0,n-1){
        s[i+1]=s[i]+(arr[i]<x);
    }
    vi r(n+1,0);
    fr(i,n+1){
        r[s[i]]++;
    }
    vi v(n+1,0);
    fr(i,n+1){
        v[i]=r[n-i];
    }
    polymulmod(r,v,0,1,0);
    int ans[n+1];
    rep(i,1,n){
        ans[i]=r[i+n];
    }
    ans[0]=0;
    int cnt=0;
    for(int i=0;i<n;i++){
        if(arr[i]<x){
            ans[0]+=cnt*(cnt+1)/2;
            cnt=0;
        }
        else{
            cnt++;
        }
    }
    ans[0]+=cnt*(cnt+1)/2;
    cnt=0;
    fr(i,n+1){
        cout<<ans[i]<<" ";
    }

}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    pre();
    int t=1;
    //cin>>t;
    for(int i=1;i<=t;i++){
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;
#define debarr(a,n) cout<<#a<<" : ";for(int i=0;i<n;i++) cerr<<a[i]<<" "; cerr<<endl;
#define debmat(mat,row,col) cout<<#mat<<" :\n";for(int i=0;i<row;i++) {for(int j=0;j<col;j++) cerr<<mat[i][j]<<" ";cerr<<endl;}
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const unordered_set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const unordered_map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const multiset<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
lli binpow(lli b,lli p,lli mod){lli ans=1;for(;p;p>>=1){if(p&1)ans=ans*b%mod;b=b*b%mod;}return ans;}

void pre(){

}

#define vii vector<pii>
#define vi vi
#define eb emplace_back
lli powr(lli a, lli b, lli mod)
{
    lli x = 1%mod;
    a %= mod;
    while(b)
    {
        if(b&1)
            x = (x*a)%mod;
        a = (a*a)%mod;
        b >>= 1;
    }
    return x;
}
lli inv(lli a, lli mod)
{
    return powr(a,mod-2,mod);
}

const int maxn = 1e6+10;

void mul_naive(vi& a, vi& b)
{
    vi c(a.size()+b.size()-1);
    for(int i = 0;i<a.size();i++)
        for(int j = 0;j<b.size();j++)
            c[i+j]+=a[i]*b[j];
    a = c;
}

class NTT{
    /* Using NTT for multiplication of polynomials:

     p1 and p2 are primes of form k* 2^21 + 1, and g1 and g2 are their primitive roots respectively.
     These are selected such that they are close to 10^9. NTT is
     applied modulo both primes and then CRT is used, to get precise result(p1*p2 is assumed to
     greater than alli coefficients of the resulting polynomial. )

     p1 = 463470593
     g1 = 3
     p2 = 469762049
     g2 = 3
     inv1 = p1^-1 (mod p2) = 313174774
     inv2 = p2^-1 (mod p1) = 154490124
    */

    lli p,g,n,logn;
public:
    NTT(lli P, lli G, lli LOGN)
    {
        p = P;
        lli g1 = G;
        logn = LOGN;
        n = (1<<LOGN);
        assert((p-1)%n == 0);
        // p = k*n + 1;
        // We need g = g1^k, so that the order of g wrt p is n.
        g = powr(g1,(p-1)>>logn,p);
    }

    int bitrevcopy(int i)// create bitreversed copy of i.
    {
        int ret = 0;
        for(int j = 0;j<logn;j++)
            if(i&(1<<j))
                ret|=(1<<(logn-1-j));
        return ret;
    }
    void fft(vi& a, bool invert) // Use fast fourier transform to find polynomial values at g^i,0<=i<n
    {
        lli mod = p;
        for(int i = 0;i<n;i++)
        {
            int br = bitrevcopy(i);
            if(i<br)
                swap(a[i],a[br]);
        }
        for(int i = 1;i<=logn;i++)
        {
            lli mul = powr(g,1<<(logn-i),p);
            if(invert)
                mul = inv(mul,p);
            int add = (1<<i);
            for(int k = 0;k<n;k+=add)
            {
                lli w = 1;
                lli lim = (add>>1);
                for(int j = 0;j<lim;j++)
                {
                    lli u = (w*a[k+j+lim])%p, v = a[k+j];
                    a[k+j] = u+v;
                    if(a[k+j]>=p)
                        a[k+j] -= p;
                    a[k+j+lim] = v-u;
                    if(a[k+j+lim]<0)
                        a[k+j+lim]+=p;
                    w = (w*mul)%p;
                }
            }
        }
        if(invert){
            lli _inv = inv(n,p);
            for(int i = 0;i<n;i++){
                a[i] = (a[i]*_inv)%p;
            }
        }
    }
};

lli mulmod(lli a, lli b, lli mod){
    if(a == 0 || b == 0)
        return 0;
    if(b <= 4e18/a)
        return (a*b)%mod;
    lli b1 = b/4,b2=b-4*b1;
    // a*(4*b1+b2)
    return (a*b2 + 4*mulmod(a,b1,mod))%mod;
}
void NTT_mul(vi& a, vi& B) // Works precisely if every coefficient of resulting polynomial is < p1*p2.
{
    // lli p1 = 463470593,g1 = 3,p2 = 469762049,g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    /*
       p          g
    635437057     11
    639631361     6
    645922817     3
    648019969     17
    666894337     5
    683671553     3
    710934529     17
    715128833     3
    740294657     3
    754974721     11
    786432001     7
    799014913     13
    824180737     5
    880803841     26
    897581057     3
    899678209     7
    918552577     5
    924844033     5
    935329793     3
    943718401     7
    950009857     7
    962592769     7
    975175681     17
    985661441     3
    998244353     3
    */
    vi b = B;
    lli p1 = 998244353 ,g1 = 3,p2 = 985661441 , g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    lli mul1 = (p1*inv1)%(p1*p2) ,mul2 =(p2*inv2)%(p1*p2);
    int _sz = a.size()+b.size()-1;
    int LOGN = 0;
    while((1<<LOGN) < _sz)LOGN++;
    lli N = (1<<LOGN);
    a.resize(N);
    b.resize(N);
    vi a1 = a,b1 = b;
    NTT fft1 = NTT(p1,g1,LOGN);
    NTT fft2 = NTT(p2,g2,LOGN);
    fft1.fft(a,false);
    fft1.fft(b,false);
    fft2.fft(a1,false);
    fft2.fft(b1,false);
    for(int i = 0;i<N;i++){
        a[i] = (a[i]*b[i])%p1;
        a1[i] = (a1[i]*b1[i])%p2;
    }
    fft1.fft(a,true);
    fft2.fft(a1,true);
    lli md = p1*p2;
    a.resize(_sz);
    for(int i = 0;i<_sz;i++){
        a[i] = (mulmod(mul1,a1[i],md)+mulmod(mul2,a[i],md))%(md);
    }
}
#define VI vector <ld>
typedef complex<double> base;
double PI = 2.0*acos(0.0);
void fft(vector<base> & a, bool invert) {
    int n = (int) a.size();
    for (int i=1, j=0; i<n; ++i) {
        int bit = n >> 1;
        for (; j>=bit; bit>>=1)
            j -= bit;
        j += bit;
        if (i < j)
            swap (a[i], a[j]);
    }
    for (int len=2; len<=n; len<<=1) {
        double ang = 2*PI/len * (invert ? -1 : 1);
        base wlen (cos(ang), sin(ang));
        for (int i=0; i<n; i+=len) {
            base w (1);
            for (int j=0; j<len/2; ++j) {
                base 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 (int i=0; i<n; ++i)
            a[i] /= n;
}

void multiply(vi &a,vi &B) {
    vi b = B;
    vector<base> fa(a.begin(),a.end()),fb(b.begin(),b.end());
    int n = 1;
    while (n < max(a.size(),b.size()))n<<=1;n<<=1;
    fa.resize (n),fb.resize(n);
    fft(fa, false),fft(fb, false);
    for(size_t i=0;i<n; ++i)fa[i] *= fb[i];
    fft(fa, true);
    a.resize(n);
    for (size_t i=0;i<a.size(); ++i)
        a[i]=((lli)(fa[i].real()+0.5));
}
void polymulmod(vi& a, vi& b, bool takemod, lli mod, bool give_a_fuck_about_precision){
    int sa=a.size(),sb=b.size();
    if(sa*1ll*sb <= 100000)mul_naive(a,b);
    else if(!give_a_fuck_about_precision)multiply(a,b);
    else NTT_mul(a,b);
    if(takemod)for(int i = 0;i<a.size();i++)a[i]%=mod;
}
const lli mod = 13313;
vi polymul(vector<vi>& X, int k){
    if(X.empty()){
        vi ret;
        ret.eb(1);
        return ret;
    }
    if(X.size()==1)
        return X[0];
    int k1 = (X.size()>>1);
    vector<vi> v1(X.begin(),X.begin()+k1);
    vector<vi> v2(X.begin()+k1,X.end());
    vi V1 = polymul(v1,k),V2 = polymul(v2,k);
    polymulmod(V1,V2,1,mod,1);
    V1.resize(min((int)V1.size(),k+1));
    return V1;
}

void solve(){
    lli n,x;
    cin>>n>>x;
    lli arr[n];
    fr(i,n)cin>>arr[i];
    vi s(n+1);
    s[0]=0;
    rep(i,0,n-1){
        s[i+1]=s[i]+(arr[i]<x);
    }
    vi r(n+1,0);
    fr(i,n+1){
        r[s[i]]++;
    }
    vi v(n+1,0);
    fr(i,n+1){
        v[i]=r[n-i];
    }
    polymulmod(r,v,0,1,1);
    lli ans[n+1];
    rep(i,1,n){
        ans[i]=r[i+n];
    }
    ans[0]=0;
    lli cnt=0;
    for(int i=0;i<n;i++){
        if(arr[i]<x){
            ans[0]+=cnt*(cnt+1)/2;
            cnt=0;
        }
        else{
            cnt++;
        }
    }
    ans[0]+=cnt*(cnt+1)/2;
    cnt=0;
    fr(i,n+1){
        cout<<ans[i]<<" ";
    }

}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    pre();
    int t=1;
    //cin>>t;
    for(int i=1;i<=t;i++){
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;

void pre(){

}

lli powr(lli a, lli b, lli mod){
    lli x = 1%mod;a %= mod;
    while(b){
        if(b&1)x = (x*a)%mod;
        a = (a*a)%mod;b >>= 1;}
    return x;
}
lli inv(lli a, lli mod){
    return powr(a,mod-2,mod);
}

const int maxn = 1e6+10;

void mul_naive(vi& a, vi& b){
    vi c(a.size()+b.size()-1);
    for(int i = 0;i<a.size();i++)
        for(int j = 0;j<b.size();j++)
            c[i+j]+=a[i]*b[j];
    a = c;
}

class NTT{
    /* Using NTT for multiplication of polynomials:
     p1 and p2 are primes of form k* 2^21 + 1, and g1 and g2 are their primitive roots respectively.
     These are selected such that they are close to 10^9. NTT is
     applied modulo both primes and then CRT is used, to get precise result(p1*p2 is assumed to
     greater than alli coefficients of the resulting polynomial. )

     p1 = 463470593
     g1 = 3
     p2 = 469762049
     g2 = 3
     inv1 = p1^-1 (mod p2) = 313174774
     inv2 = p2^-1 (mod p1) = 154490124
    */
    lli p,g,n,logn;
public:
    NTT(lli P, lli G, lli LOGN){
        p = P;
        lli g1 = G;
        logn = LOGN;
        n = (1<<LOGN);
        assert((p-1)%n == 0);
        // p = k*n + 1;
        // We need g = g1^k, so that the order of g wrt p is n.
        g = powr(g1,(p-1)>>logn,p);
    }
    int bitrevcopy(int i){
        int ret = 0;
        for(int j = 0;j<logn;j++)
            if(i&(1<<j))
                ret|=(1<<(logn-1-j));
        return ret;
    }
    void fft(vi& a, bool invert){ // Use fast fourier transform to find polynomial values at g^i,0<=i<n
        lli mod = p;
        for(int i = 0;i<n;i++) {
            int br = bitrevcopy(i);
            if(i<br)
                swap(a[i],a[br]);
        }
        for(int i = 1;i<=logn;i++) {
            lli mul = powr(g,1<<(logn-i),p);
            if(invert)
                mul = inv(mul,p);
            int add = (1<<i);
            for(int k = 0;k<n;k+=add) {
                lli w = 1;
                lli lim = (add>>1);
                for(int j = 0;j<lim;j++) {
                    lli u = (w*a[k+j+lim])%p, v = a[k+j];
                    a[k+j] = u+v;
                    if(a[k+j]>=p)
                        a[k+j] -= p;
                    a[k+j+lim] = v-u;
                    if(a[k+j+lim]<0)
                        a[k+j+lim]+=p;
                    w = (w*mul)%p;
                }
            }
        }
        if(invert){
            lli _inv = inv(n,p);
            for(int i = 0;i<n;i++){
                a[i] = (a[i]*_inv)%p;
            }
        }
    }
};

lli mulmod(lli a, lli b, lli mod){
    if(a == 0 || b == 0)return 0;
    if(b <= 4e18/a)return (a*b)%mod;
    lli b1 = b/4,b2=b-4*b1;
    return (a*b2 + 4*mulmod(a,b1,mod))%mod;
}
void NTT_mul(vi& a, vi& B) // Works precisely if every coefficient of resulting polynomial is < p1*p2.
{
    // lli p1 = 463470593,g1 = 3,p2 = 469762049,g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    /*
       p          g
    635437057     11
    639631361     6
    645922817     3
    648019969     17
    666894337     5
    683671553     3
    710934529     17
    715128833     3
    740294657     3
    754974721     11
    786432001     7
    799014913     13
    824180737     5
    880803841     26
    897581057     3
    899678209     7
    918552577     5
    924844033     5
    935329793     3
    943718401     7
    950009857     7
    962592769     7
    975175681     17
    985661441     3
    998244353     3
    */
    vi b = B;
    lli p1 = 998244353 ,g1 = 3,p2 = 985661441 , g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    lli mul1 = (p1*inv1)%(p1*p2) ,mul2 =(p2*inv2)%(p1*p2);
    int _sz = a.size()+b.size()-1;
    int LOGN = 0;
    while((1<<LOGN) < _sz)LOGN++;
    lli N = (1<<LOGN);
    a.resize(N);
    b.resize(N);
    vi a1 = a,b1 = b;
    NTT fft1 = NTT(p1,g1,LOGN);
    NTT fft2 = NTT(p2,g2,LOGN);
    fft1.fft(a,false);
    fft1.fft(b,false);
    fft2.fft(a1,false);
    fft2.fft(b1,false);
    for(int i = 0;i<N;i++){
        a[i] = (a[i]*b[i])%p1;
        a1[i] = (a1[i]*b1[i])%p2;
    }
    fft1.fft(a,true);
    fft2.fft(a1,true);
    lli md = p1*p2;
    a.resize(_sz);
    for(int i = 0;i<_sz;i++){
        a[i] = (mulmod(mul1,a1[i],md)+mulmod(mul2,a[i],md))%(md);
    }
}
#define VI vector <ld>
typedef complex<double> base;
double PI = 2.0*acos(0.0);
void fft(vector<base> & a, bool invert){
    int n = (int) a.size();
    for (int i=1, j=0; i<n; ++i){
        int bit = n >> 1;
        for (; j>=bit; bit>>=1)
            j -= bit;
        j += bit;
        if (i < j)
            swap (a[i], a[j]);
    }
    for (int len=2; len<=n; len<<=1){
        double ang = 2*PI/len * (invert ? -1 : 1);
        base wlen (cos(ang), sin(ang));
        for (int i=0; i<n; i+=len){
            base w (1);
            for (int j=0; j<len/2; ++j){
                base 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 (int i=0; i<n; ++i)
            a[i] /= n;
}

void multiply(vi &a,vi &B){
    vi b = B;
    vector<base> fa(a.begin(),a.end()),fb(b.begin(),b.end());
    int n = 1;
    while (n < max(a.size(),b.size()))n<<=1;n<<=1;
    fa.resize (n),fb.resize(n);
    fft(fa, false),fft(fb, false);
    for(size_t i=0;i<n; ++i)fa[i] *= fb[i];
    fft(fa, true);
    a.resize(n);
    for (size_t i=0;i<a.size(); ++i)
        a[i]=((lli)(fa[i].real()+0.5));
}
void polymulmod(vi& a, vi& b, bool takemod, lli mod, bool give_a_fuck_about_precision){
    int sa=a.size(),sb=b.size();
    if(sa*1ll*sb <= 100000)mul_naive(a,b);
    else if(!give_a_fuck_about_precision)multiply(a,b);
    else NTT_mul(a,b);
    if(takemod)for(int i = 0;i<a.size();i++)a[i]%=mod;
}
const lli mod = 13313;
vi polymul(vector<vi>& X, int k){
    if(X.empty()){
        vi ret;
        ret.EB(1);
        return ret;
    }
    if(X.size()==1)
        return X[0];
    int k1 = (X.size()>>1);
    vector<vi> v1(X.begin(),X.begin()+k1);
    vector<vi> v2(X.begin()+k1,X.end());
    vi V1 = polymul(v1,k),V2 = polymul(v2,k);
    polymulmod(V1,V2,1,mod,1);
    V1.resize(min((int)V1.size(),k+1));
    return V1;
}

void solve(){
    lli n,x;
    cin>>n>>x;
    lli arr[n];
    fr(i,n)cin>>arr[i];
    vi s(n+1);
    s[0]=0;
    rep(i,0,n-1){
        s[i+1]=s[i]+(arr[i]<x);
    }
    vi r(n+1,0);
    fr(i,n+1){
        r[s[i]]++;
    }
    vi v(n+1,0);
    fr(i,n+1){
        v[i]=r[n-i];
    }
    polymulmod(r,v,0,1,1);
    lli ans[n+1];
    rep(i,1,n){
        ans[i]=r[i+n];
    }
    ans[0]=0;
    lli cnt=0;
    for(int i=0;i<n;i++){
        if(arr[i]<x){
            ans[0]+=cnt*(cnt+1)/2;
            cnt=0;
        }
        else{
            cnt++;
        }
    }
    ans[0]+=cnt*(cnt+1)/2;
    cnt=0;
    fr(i,n+1){
        cout<<ans[i]<<" ";
    }

}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    pre();
    int t=1;
    //cin>>t;
    for(int i=1;i<=t;i++){
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;
#define debarr(a,n) cout<<#a<<" : ";for(int i=0;i<n;i++) cerr<<a[i]<<" "; cerr<<endl;
#define debmat(mat,row,col) cout<<#mat<<" :\n";for(int i=0;i<row;i++) {for(int j=0;j<col;j++) cerr<<mat[i][j]<<" ";cerr<<endl;}
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const unordered_set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const unordered_map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const multiset<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
lli binpow(lli b,lli p,lli mod){lli ans=1;for(;p;p>>=1){if(p&1)ans=ans*b%mod;b=b*b%mod;}return ans;}

void pre(){

}

namespace myfft{
    struct base{
	    ld x,y;
	    base(){x=y=0;}
	    base(ld _x, ld _y){x = _x,y = _y;}
	    base(ld _x){x = _x, y = 0;}
	    void operator = (ld _x){x = _x,y = 0;}
	    ld real(){return x;}
	    ld imag(){return y;}
	    base operator + (const base& b){return base(x+b.x,y+b.y);}
	    void operator += (const base& b){x+=b.x,y+=b.y;}
	    base operator * (const base& b){return base(x*b.x - y*b.y,x*b.y+y*b.x);}
	    void operator *= (const base& b){ld p = x*b.x - y*b.y, q = x*b.y+y*b.x; x = p, y = q;}
	    void operator /= (ld k){x/=k,y/=k;}
	    base operator - (const base& b){return base(x - b.x,y - b.y);}
	    void operator -= (const base& b){x -= b.x, y -= b.y;}
	    base conj(){ return base(x, -y);}
	    base operator / (ld k) { return base(x / k, y / k);}
	};
	double PI = 2.0*acos(0.0);
	const int MAXN = 21;
	const int maxn = (1<<MAXN);
	base W[maxn],invW[maxn], P1[maxn], Q1[maxn];
	void precompute_powers(){
	    for(int i = 0;i<maxn/2;i++){
	        double ang = (2*PI*i)/maxn;
	        ld _cos = cos(ang), _sin = sin(ang);
	        W[i] = base(_cos,_sin);
	        invW[i] = base(_cos,-_sin);
	    }
	}
	void fft (vector<base> & a, bool invert) {
	    int n = (int) a.size();

	    for (int i=1, j=0; i<n; ++i) {
	        int bit = n >> 1;
	        for (; j>=bit; bit>>=1)
	            j -= bit;
	        j += bit;
	        if (i < j)
	            swap (a[i], a[j]);
	    }
	    for (int len=2; len<=n; len<<=1) {
	        for (int i=0; i<n; i+=len) {
	            int ind = 0,add = maxn/len;
	            for (int j=0; j<len/2; ++j) {
	                base u = a[i+j],  v = (a[i+j+len/2] * (invert?invW[ind]:W[ind]));
	                a[i+j] = (u + v);
	                a[i+j+len/2] = (u - v);
	                ind += add;
	            }
	        }
	    }
	    if (invert) for (int i=0; i<n; ++i) a[i] /= n;
	}
	// In case of precision issues change vi to vi
	void multiply(vi &a, vi & b, lli mod){
	    int n1 = a.size(),n2 = b.size();
	    int final_size = a.size() + b.size() - 1;
	    int n = 1;
	    while(n < final_size) n <<= 1;
	    vector<base> P(n), Q(n);
	    int SQRTMOD = (int)sqrt(mod) + 10;
	    for(int i = 0;i < n1;i++) P[i] = base(a[i] % SQRTMOD, a[i] / SQRTMOD);
	    for(int i = 0;i < n2;i++) Q[i] = base(b[i] % SQRTMOD, b[i] / SQRTMOD);
	    fft(P, 0);
	    fft(Q, 0);
	    base A1, A2, B1, B2, X, Y;
	    for(int i = 0; i < n; i++){
	        X = P[i];
	        Y = P[(n - i) % n].conj();
	        A1 = (X + Y) * base(0.5, 0);
	        A2 = (X - Y) * base(0, -0.5);
	        X = Q[i];
	        Y = Q[(n - i) % n].conj();
	        B1 = (X + Y) * base(0.5, 0);
	        B2 = (X - Y) * base(0, -0.5);
	        P1[i] = A1 * B1 + A2 * B2 * base(0, 1);
	        Q1[i] = A1 * B2 + A2 * B1;
	    }
	    for(int i = 0; i < n; i++) P[i] = P1[i], Q[i] = Q1[i];
	    fft(P, 1);
	    fft(Q, 1);
	    a.resize(final_size);
	    for(int i = 0; i < final_size; i++){
	        lli x = (lli)(P[i].real() + 0.5);
	        lli y = (lli)(P[i].imag() + 0.5) % mod;
	        lli z = (lli)(Q[i].real() + 0.5);
	        a[i] = (x + ((y * SQRTMOD + z) % mod) * SQRTMOD) % mod;
	    }
	}
    const lli mod = 1e9+7;
}

void solve(){
	lli n,x;
	cin>>n>>x;
	lli arr[n];
	fr(i,n)cin>>arr[i];
	vi s(n+1);
	s[0]=0;
	rep(i,0,n-1){
		s[i+1]=s[i]+(arr[i]<x);
	}
	vi r(n+1,0);
	fr(i,n+1){
		r[s[i]]++;
	}
	vi v(n+1,0);
	fr(i,n+1){
		v[i]=r[n-i];
	}
	myfft::precompute_powers();
	myfft::multiply(r,v,MOD*400);
	int ans[n+1];
	rep(i,1,n){
		ans[i]=r[i+n];
	}
	ans[0]=0;
	int cnt=0;
	for(int i=0;i<n;i++){
		if(arr[i]<x){
			ans[0]+=cnt*(cnt+1)/2;
			cnt=0;
		}
		else{
			cnt++;
		}
	}
	ans[0]+=cnt*(cnt+1)/2;
	cnt=0;
	fr(i,n+1){
		cout<<ans[i]<<" ";
	}
}

int main(){
	ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
	//freopen("in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	pre();
	int t=1;
	//cin>>t;
	for(int i=1;i<=t;i++){
		//cout<<"Case #"<<i<<": ";
		solve();
	}
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;

void pre(){

}

lli powr(lli a, lli b, lli mod){
    lli x = 1%mod;a %= mod;
    while(b){
        if(b&1)x = (x*a)%mod;
        a = (a*a)%mod;b >>= 1;}
    return x;
}
lli inv(lli a, lli mod){
    return powr(a,mod-2,mod);
}

const int maxn = 1e6+10;

void mul_naive(vi& a, vi& b){
    vi c(a.size()+b.size()-1);
    for(int i = 0;i<a.size();i++)
        for(int j = 0;j<b.size();j++)
            c[i+j]+=a[i]*b[j];
    a = c;
}

class NTT{
    /* Using NTT for multiplication of polynomials:
     p1 and p2 are primes of form k* 2^21 + 1, and g1 and g2 are their primitive roots respectively.
     These are selected such that they are close to 10^9. NTT is
     applied modulo both primes and then CRT is used, to get precise result(p1*p2 is assumed to
     greater than alli coefficients of the resulting polynomial. )

     p1 = 463470593
     g1 = 3
     p2 = 469762049
     g2 = 3
     inv1 = p1^-1 (mod p2) = 313174774
     inv2 = p2^-1 (mod p1) = 154490124
    */
    lli p,g,n,logn;
public:
    NTT(lli P, lli G, lli LOGN){
        p = P;
        lli g1 = G;
        logn = LOGN;
        n = (1<<LOGN);
        assert((p-1)%n == 0);
        // p = k*n + 1;
        // We need g = g1^k, so that the order of g wrt p is n.
        g = powr(g1,(p-1)>>logn,p);
    }
    int bitrevcopy(int i){
        int ret = 0;
        for(int j = 0;j<logn;j++)
            if(i&(1<<j))
                ret|=(1<<(logn-1-j));
        return ret;
    }
    void fft(vi& a, bool invert){ // Use fast fourier transform to find polynomial values at g^i,0<=i<n
        lli mod = p;
        for(int i = 0;i<n;i++) {
            int br = bitrevcopy(i);
            if(i<br)
                swap(a[i],a[br]);
        }
        for(int i = 1;i<=logn;i++) {
            lli mul = powr(g,1<<(logn-i),p);
            if(invert)
                mul = inv(mul,p);
            int add = (1<<i);
            for(int k = 0;k<n;k+=add) {
                lli w = 1;
                lli lim = (add>>1);
                for(int j = 0;j<lim;j++) {
                    lli u = (w*a[k+j+lim])%p, v = a[k+j];
                    a[k+j] = u+v;
                    if(a[k+j]>=p)
                        a[k+j] -= p;
                    a[k+j+lim] = v-u;
                    if(a[k+j+lim]<0)
                        a[k+j+lim]+=p;
                    w = (w*mul)%p;
                }
            }
        }
        if(invert){
            lli _inv = inv(n,p);
            for(int i = 0;i<n;i++){
                a[i] = (a[i]*_inv)%p;
            }
        }
    }
};

lli mulmod(lli a, lli b, lli mod){
    if(a == 0 || b == 0)return 0;
    if(b <= 4e18/a)return (a*b)%mod;
    lli b1 = b/4,b2=b-4*b1;
    return (a*b2 + 4*mulmod(a,b1,mod))%mod;
}
void NTT_mul(vi& a, vi& B) // Works precisely if every coefficient of resulting polynomial is < p1*p2.
{
    // lli p1 = 463470593,g1 = 3,p2 = 469762049,g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    /*
       p          g
    635437057     11
    639631361     6
    645922817     3
    648019969     17
    666894337     5
    683671553     3
    710934529     17
    715128833     3
    740294657     3
    754974721     11
    786432001     7
    799014913     13
    824180737     5
    880803841     26
    897581057     3
    899678209     7
    918552577     5
    924844033     5
    935329793     3
    943718401     7
    950009857     7
    962592769     7
    975175681     17
    985661441     3
    998244353     3
    */
    vi b = B;
    lli p1 = 998244353 ,g1 = 3,p2 = 985661441 , g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    lli mul1 = (p1*inv1)%(p1*p2) ,mul2 =(p2*inv2)%(p1*p2);
    int _sz = a.size()+b.size()-1;
    int LOGN = 0;
    while((1<<LOGN) < _sz)LOGN++;
    lli N = (1<<LOGN);
    a.resize(N);
    b.resize(N);
    vi a1 = a,b1 = b;
    NTT fft1 = NTT(p1,g1,LOGN);
    NTT fft2 = NTT(p2,g2,LOGN);
    fft1.fft(a,false);
    fft1.fft(b,false);
    fft2.fft(a1,false);
    fft2.fft(b1,false);
    for(int i = 0;i<N;i++){
        a[i] = (a[i]*b[i])%p1;
        a1[i] = (a1[i]*b1[i])%p2;
    }
    fft1.fft(a,true);
    fft2.fft(a1,true);
    lli md = p1*p2;
    a.resize(_sz);
    for(int i = 0;i<_sz;i++){
        a[i] = (mulmod(mul1,a1[i],md)+mulmod(mul2,a[i],md))%(md);
    }
}
#define VI vector <ld>
typedef complex<double> base;
double PI = 2.0*acos(0.0);
void fft(vector<base> & a, bool invert){
    int n = (int) a.size();
    for (int i=1, j=0; i<n; ++i){
        int bit = n >> 1;
        for (; j>=bit; bit>>=1)
            j -= bit;
        j += bit;
        if (i < j)
            swap (a[i], a[j]);
    }
    for (int len=2; len<=n; len<<=1){
        double ang = 2*PI/len * (invert ? -1 : 1);
        base wlen (cos(ang), sin(ang));
        for (int i=0; i<n; i+=len){
            base w (1);
            for (int j=0; j<len/2; ++j){
                base 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 (int i=0; i<n; ++i)
            a[i] /= n;
}

void multiply(vi &a,vi &B){
    vi b = B;
    vector<base> fa(a.begin(),a.end()),fb(b.begin(),b.end());
    int n = 1;
    while (n < max(a.size(),b.size()))n<<=1;n<<=1;
    fa.resize (n),fb.resize(n);
    fft(fa, false),fft(fb, false);
    for(size_t i=0;i<n; ++i)fa[i] *= fb[i];
    fft(fa, true);
    a.resize(n);
    for (size_t i=0;i<a.size(); ++i)
        a[i]=((lli)(fa[i].real()+0.5));
}
void polymulmod(vi& a, vi& b, bool takemod, lli mod, bool give_a_fuck_about_precision){
    int sa=a.size(),sb=b.size();
    if(sa*1ll*sb <= 100000)mul_naive(a,b);
    else if(!give_a_fuck_about_precision)multiply(a,b);
    else NTT_mul(a,b);
    if(takemod)for(int i = 0;i<a.size();i++)a[i]%=mod;
}
const lli mod = 13313;
vi polymul(vector<vi>& X, int k){
    if(X.empty()){
        vi ret;
        ret.EB(1);
        return ret;
    }
    if(X.size()==1)
        return X[0];
    int k1 = (X.size()>>1);
    vector<vi> v1(X.begin(),X.begin()+k1);
    vector<vi> v2(X.begin()+k1,X.end());
    vi V1 = polymul(v1,k),V2 = polymul(v2,k);
    polymulmod(V1,V2,1,mod,1);
    V1.resize(min((int)V1.size(),k+1));
    return V1;
}

void solve(){
    lli n,x;
    cin>>n>>x;
    lli arr[n];
    fr(i,n)cin>>arr[i];
    vi s(n+1);
    s[0]=0;
    rep(i,0,n-1){
        s[i+1]=s[i]+(arr[i]<x);
    }
    vi r(n+1,0);
    fr(i,n+1){
        r[s[i]]++;
    }
    vi v(n+1,0);
    fr(i,n+1){
        v[i]=r[n-i];
    }
    polymulmod(r,v,0,1,0);
    lli ans[n+1];
    rep(i,1,n){
        ans[i]=r[i+n];
    }
    ans[0]=0;
    lli cnt=0;
    for(int i=0;i<n;i++){
        if(arr[i]<x){
            ans[0]+=cnt*(cnt+1)/2;
            cnt=0;
        }
        else{
            cnt++;
        }
    }
    ans[0]+=cnt*(cnt+1)/2;
    cnt=0;
    fr(i,n+1){
        cout<<ans[i]<<" ";
    }

}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    pre();
    int t=1;
    //cin>>t;
    for(int i=1;i<=t;i++){
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}


#include<bits/stdc++.h>
using namespace std;
#define F first
#define S second
#define EB emplace_back
#define MP make_pair
#define all(o) (o).begin(), (o).end()
#define mset(m,v) memset(m,v,sizeof(m))
#define fr(i,n) for(lli i=0;i<n;++i)
#define rep(i,a,b) for(lli i=a;i<=b;++i)
#define remin(a,b) (a=min((a),(b)))
#define remax(a,b) (a=max((a),(b)))
#define endl '\n'
typedef long long int lli;    typedef long double ld;
typedef pair< lli,lli > ii;   typedef vector<lli> vi;
typedef vector<ii> vii;       typedef vector<vi> graph;
lli MOD=1000000007;           long double EPS=1e-9;
#define debarr(a,n) cout<<#a<<" : ";for(int i=0;i<n;i++) cerr<<a[i]<<" "; cerr<<endl;
#define debmat(mat,row,col) cout<<#mat<<" :\n";for(int i=0;i<row;i++) {for(int j=0;j<col;j++) cerr<<mat[i][j]<<" ";cerr<<endl;}
#define pr(...) dbs(#__VA_ARGS__, __VA_ARGS__)
template <class S, class T>ostream& operator <<(ostream& os, const pair<S, T>& p) {return os << "(" << p.first << ", " << p.second << ")";}
template <class T>ostream& operator <<(ostream& os, const vector<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const unordered_set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const unordered_map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const set<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T>ostream& operator <<(ostream& os, const multiset<T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class S, class T>ostream& operator <<(ostream& os, const map<S, T>& p) {os << "[ "; for (auto& it : p) os << it << " "; return os << "]";}
template <class T> void dbs(string str, T t) {cerr << str << " : " << t << "\n";}
template <class T, class... S> void dbs(string str, T t, S... s) {int idx = str.find(','); cerr << str.substr(0, idx) << " : " << t << ","; dbs(str.substr(idx + 1), s...);}
template <class T> void prc(T a, T b) {cerr << "["; for (T i = a; i != b; ++i) {if (i != a) cerr << ", "; cerr << *i;} cerr << "]\n";}
lli binpow(lli b,lli p,lli mod){lli ans=1;for(;p;p>>=1){if(p&1)ans=ans*b%mod;b=b*b%mod;}return ans;}

void pre(){

}

#define vii vector<pii>
#define vi vi
#define eb emplace_back
lli powr(lli a, lli b, lli mod)
{
    lli x = 1%mod;
    a %= mod;
    while(b)
    {
        if(b&1)
            x = (x*a)%mod;
        a = (a*a)%mod;
        b >>= 1;
    }
    return x;
}
lli inv(lli a, lli mod)
{
    return powr(a,mod-2,mod);
}

const int maxn = 1e6+10;

void mul_naive(vi& a, vi& b)
{
    vi c(a.size()+b.size()-1);
    for(int i = 0;i<a.size();i++)
        for(int j = 0;j<b.size();j++)
            c[i+j]+=a[i]*b[j];
    a = c;
}

class NTT{
    /* Using NTT for multiplication of polynomials:

     p1 and p2 are primes of form k* 2^21 + 1, and g1 and g2 are their primitive roots respectively.
     These are selected such that they are close to 10^9. NTT is
     applied modulo both primes and then CRT is used, to get precise result(p1*p2 is assumed to
     greater than alli coefficients of the resulting polynomial. )

     p1 = 463470593
     g1 = 3
     p2 = 469762049
     g2 = 3
     inv1 = p1^-1 (mod p2) = 313174774
     inv2 = p2^-1 (mod p1) = 154490124
    */

    lli p,g,n,logn;
public:
    NTT(lli P, lli G, lli LOGN)
    {
        p = P;
        lli g1 = G;
        logn = LOGN;
        n = (1<<LOGN);
        assert((p-1)%n == 0);
        // p = k*n + 1;
        // We need g = g1^k, so that the order of g wrt p is n.
        g = powr(g1,(p-1)>>logn,p);
    }

    int bitrevcopy(int i)// create bitreversed copy of i.
    {
        int ret = 0;
        for(int j = 0;j<logn;j++)
            if(i&(1<<j))
                ret|=(1<<(logn-1-j));
        return ret;
    }
    void fft(vi& a, bool invert) // Use fast fourier transform to find polynomial values at g^i,0<=i<n
    {
        lli mod = p;
        for(int i = 0;i<n;i++)
        {
            int br = bitrevcopy(i);
            if(i<br)
                swap(a[i],a[br]);
        }
        for(int i = 1;i<=logn;i++)
        {
            lli mul = powr(g,1<<(logn-i),p);
            if(invert)
                mul = inv(mul,p);
            int add = (1<<i);
            for(int k = 0;k<n;k+=add)
            {
                lli w = 1;
                lli lim = (add>>1);
                for(int j = 0;j<lim;j++)
                {
                    lli u = (w*a[k+j+lim])%p, v = a[k+j];
                    a[k+j] = u+v;
                    if(a[k+j]>=p)
                        a[k+j] -= p;
                    a[k+j+lim] = v-u;
                    if(a[k+j+lim]<0)
                        a[k+j+lim]+=p;
                    w = (w*mul)%p;
                }
            }
        }
        if(invert){
            lli _inv = inv(n,p);
            for(int i = 0;i<n;i++){
                a[i] = (a[i]*_inv)%p;
            }
        }
    }
};

lli mulmod(lli a, lli b, lli mod){
    if(a == 0 || b == 0)
        return 0;
    if(b <= 4e18/a)
        return (a*b)%mod;
    lli b1 = b/4,b2=b-4*b1;
    // a*(4*b1+b2)
    return (a*b2 + 4*mulmod(a,b1,mod))%mod;
}
void NTT_mul(vi& a, vi& B) // Works precisely if every coefficient of resulting polynomial is < p1*p2.
{
    // lli p1 = 463470593,g1 = 3,p2 = 469762049,g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    /*
       p          g
    635437057     11
    639631361     6
    645922817     3
    648019969     17
    666894337     5
    683671553     3
    710934529     17
    715128833     3
    740294657     3
    754974721     11
    786432001     7
    799014913     13
    824180737     5
    880803841     26
    897581057     3
    899678209     7
    918552577     5
    924844033     5
    935329793     3
    943718401     7
    950009857     7
    962592769     7
    975175681     17
    985661441     3
    998244353     3
    */
    vi b = B;
    lli p1 = 998244353 ,g1 = 3,p2 = 985661441 , g2 = 3, inv1  = powr(p1,p2-2,p2),inv2=powr(p2,p1-2,p1);
    lli mul1 = (p1*inv1)%(p1*p2) ,mul2 =(p2*inv2)%(p1*p2);
    int _sz = a.size()+b.size()-1;
    int LOGN = 0;
    while((1<<LOGN) < _sz)LOGN++;
    lli N = (1<<LOGN);
    a.resize(N);
    b.resize(N);
    vi a1 = a,b1 = b;
    NTT fft1 = NTT(p1,g1,LOGN);
    NTT fft2 = NTT(p2,g2,LOGN);
    fft1.fft(a,false);
    fft1.fft(b,false);
    fft2.fft(a1,false);
    fft2.fft(b1,false);
    for(int i = 0;i<N;i++){
        a[i] = (a[i]*b[i])%p1;
        a1[i] = (a1[i]*b1[i])%p2;
    }
    fft1.fft(a,true);
    fft2.fft(a1,true);
    lli md = p1*p2;
    a.resize(_sz);
    for(int i = 0;i<_sz;i++){
        a[i] = (mulmod(mul1,a1[i],md)+mulmod(mul2,a[i],md))%(md);
    }
}
#define VI vector <ld>
typedef complex<double> base;
double PI = 2.0*acos(0.0);
void fft(vector<base> & a, bool invert) {
    int n = (int) a.size();
    for (int i=1, j=0; i<n; ++i) {
        int bit = n >> 1;
        for (; j>=bit; bit>>=1)
            j -= bit;
        j += bit;
        if (i < j)
            swap (a[i], a[j]);
    }
    for (int len=2; len<=n; len<<=1) {
        double ang = 2*PI/len * (invert ? -1 : 1);
        base wlen (cos(ang), sin(ang));
        for (int i=0; i<n; i+=len) {
            base w (1);
            for (int j=0; j<len/2; ++j) {
                base 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 (int i=0; i<n; ++i)
            a[i] /= n;
}

void multiply ( vi & a, vi & B) {
    vi b = B;
    vector<base> fa(a.begin(),a.end()),fb(b.begin(),b.end());
    int n = 1;
    while (n < max(a.size(),b.size()))n<<=1;n<<=1;
    fa.resize (n),fb.resize(n);
    fft(fa, false),fft(fb, false);
    for(size_t i=0;i<n; ++i)fa[i] *= fb[i];
    fft(fa, true);
    a.resize(n);
    for (size_t i=0;i<a.size(); ++i)
        a[i]=((lli)(fa[i].real()+0.5));
}

void polymulmod(vi& a, vi& b, bool takemod, lli mod, bool give_a_fuck_about_precision){
    int sa=a.size(),sb=b.size();
    if(sa*1ll*sb <= 100000)mul_naive(a,b);
    else if(!give_a_fuck_about_precision)multiply(a,b);
    else NTT_mul(a,b);
    if(takemod)for(int i = 0;i<a.size();i++)a[i]%=mod;
}
const lli mod = 13313;
vi polymul(vector<vi>& X, int k){
    if(X.empty()){
        vi ret;
        ret.eb(1);
        return ret;
    }
    if(X.size()==1)
        return X[0];
    int k1 = (X.size()>>1);
    vector<vi> v1(X.begin(),X.begin()+k1);
    vector<vi> v2(X.begin()+k1,X.end());
    vi V1 = polymul(v1,k),V2 = polymul(v2,k);
    polymulmod(V1,V2,1,mod,1);
    V1.resize(min((int)V1.size(),k+1));
    return V1;
}

void solve(){
    lli n,x;
    cin>>n>>x;
    lli arr[n];
    fr(i,n)cin>>arr[i];
    vi s(n+1);
    s[0]=0;
    rep(i,0,n-1){
        s[i+1]=s[i]+(arr[i]<x);
    }
    vi r(n+1,0);
    fr(i,n+1){
        r[s[i]]++;
    }
    vi v(n+1,0);
    fr(i,n+1){
        v[i]=r[n-i];
    }
    polymulmod(r,v,0,1,0);
    lli ans[n+1];
    rep(i,1,n){
        ans[i]=r[i+n];
    }
    ans[0]=0;
    lli cnt=0;
    for(int i=0;i<n;i++){
        if(arr[i]<x){
            ans[0]+=cnt*(cnt+1)/2;
            cnt=0;
        }
        else{
            cnt++;
        }
    }
    ans[0]+=cnt*(cnt+1)/2;
    cnt=0;
    fr(i,n+1){
        cout<<ans[i]<<" ";
    }

}

int main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    //freopen("in.txt","r",stdin);
    //freopen("out.txt","w",stdout);
    pre();
    int t=1;
    //cin>>t;
    for(int i=1;i<=t;i++){
        //cout<<"Case #"<<i<<": ";
        solve();
    }
}


#include <bits/stdc++.h>

#define fore(i, l, r) for(int i = int(l); i < int(r); ++i)
#define forn(i, n) fore(i, 0, n)
#define nfor(i, n) for(int i = int(n) - 1; i >= 0; --i)
#define for1(i, n) for(int i = 1; i < int(n); ++i)

#define mp make_pair
#define pb push_back
#define sz(a) int((a).size())
#define all(a) (a).begin(), (a).end()
#define x first
#define y second

#define correct(x, y, xmax, ymax) ((x) >= 0 && (x) < (xmax) && (y) >= 0 && (y) < (ymax))
//#define max(a, b) ((a > b)? a : b)
//#define min(a, b) ((a < b)? a : b)
//#define abs(a) ((a < 0) ? -a : a)
//#define sqr(a) (a * a)

using namespace std;

template<class T> T gcd(T a, T b) { while(a > 0){ b %= a; swap(a, b);} return b; }
template<class T> T lcm(T a, T b) { return a / gcd (a, b) * b; }
template<class T> T sign(T a) { return a > 0 ? 1 : (a < 0 ? -1 : 0); }

template<class A, class B> ostream& operator <<(ostream &out, const pair<A, B> &p) {
    return out << "(" << p.x << ", " << p.y << ")";
};

template<class A> ostream& operator <<(ostream &out, const vector<A> &v) {
    out << "[";
    forn(i, sz(v)) {
        if(i)
            out << ", ";
        out << v[i];
    }
    return out << "]";
}

mt19937 myRand(time(NULL)); // [0, 2^32)

typedef long long li;
typedef long double ld;
typedef pair<int, int> pt;
typedef vector <int> vi;

const int dx[] = {-1, 0, 1,  0};
const int dy[] = { 0, 1, 0, -1};
const int dxK[] = {-1, -1, 0, 1, 1,  1,  0, -1};
const int dyK[] = { 0,  1, 1, 1, 0, -1, -1, -1};
const int dxKn[] = {-2, -1, 1, 2,  2,  1, -1, -2};
const int dyKn[] = { 1,  2, 2, 1, -1, -2, -2, -1};

const int INF = int(1e9) + 100;
const li INF64 = li(1e18) + 100;
const ld EPS = 1e-9;
const ld PI = acosl(-1.0);

const int N = 540 * 1000 + 555;
const int LOGN = 20;

struct comp {
	double x, y;
	comp(double x = .0, double y = .0) : x(x), y(y) {}
	inline comp conj() { return comp(x, -y); }
};

inline comp operator +(const comp &a, const comp &b) {
	return comp(a.x + b.x, a.y + b.y);
}

inline comp operator -(const comp &a, const comp &b) {
	return comp(a.x - b.x, a.y - b.y);
}

inline comp operator *(const comp &a, const comp &b) {
	return comp(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}

inline comp operator /(const comp &a, const double &b) {
	return comp(a.x / b, a.y / b);
}

vector<comp> w[LOGN];
vector<int> rv[LOGN];

void precalc() {
	for(int st = 0; st < LOGN; st++) {
		w[st].assign(1 << st, comp());
		for(int k = 0; k < (1 << st); k++) {
			ld ang = PI / (1 << st) * k;
			w[st][k] = comp(cosl(ang), sinl(ang));
		}

		rv[st].assign(1 << st, 0);
		if(st == 0) {
			rv[st][0] = 0;
			continue;
		}
		int h = (1 << (st - 1));
		for(int k = 0; k < (1 << st); k++)
			rv[st][k] = (rv[st - 1][k & (h - 1)] << 1) | (k >= h);
	}
}

inline void fft(comp a[N], int n, bool inv) {
	int ln = __builtin_ctz(n);
	forn(i, n) {
		int ni = rv[ln][i];
		if(i < ni)
			swap(a[i], a[ni]);
	}

	for(int st = 0; (1 << st) < n; st++) {
		int len = (1 << st);
		for(int k = 0; k < n; k += (len << 1)) {
			for(int pos = k; pos < k + len; pos++) {
				comp l = a[pos];
				comp r = a[pos + len] * (inv ? w[st][pos - k].conj() : w[st][pos - k]);

				a[pos] = l + r;
				a[pos + len] = l - r;
			}
		}
	}

	if(inv) forn(i, n)
		a[i] = a[i] / n;
}

comp aa[N], bb[N], cc[N];

inline void multiply(comp a[N], int sza, comp b[N], int szb, comp c[N], int &szc) {
	int ln = 1;
	while(ln < (sza + szb)) // sometimes works max(sza, szb)
		ln <<= 1;

	forn(i, ln)
		aa[i] = (i < sza ? a[i] : comp());
	forn(i, ln)
		bb[i] = (i < szb ? b[i] : comp());

	fft(aa, ln, false);
	fft(bb, ln, false);

	forn(i, ln)
		cc[i] = aa[i] * bb[i];

	fft(cc, ln, true);

	szc = ln;
	forn(i, szc)
		c[i] = cc[i];
}

int n, k;
int a[N];

comp p1[N], p2[N];
comp res[N];
int szr;

inline bool read() {
	if(!(cin >> n >> k))
    	return false;
    forn(i, n) scanf("%d", a + i);
    return true;
}

int d = 200 * 1000;
inline void solve() {
//	d = n;
	precalc();
	forn(i, n) a[i] = a[i] < k;
	int sum = 0;
	forn(i, n + 1){
		p1[sum].x += 1;
		p2[d - sum].x += 1;
		sum += a[i];
	}
//	forn(i, n + 1) cout << p1[i].x << ' ';cout << endl; forn(i, n + 1) cout << p2[i].x << ' ';cout << endl;
	multiply(p1, d + 1, p2, d + 1, res, szr);
	for(int i = d; i < n + d + 1; ++i){
		li c = li(res[i].x + 0.5);
		if(i == d) c = (c - n) / 2;
		printf("%I64d ", c);
	}
	puts("");
}

int main() {
#ifdef _DEBUG
    freopen("input.txt", "r", stdin);
    int tt = clock();
#endif
    cout << fixed << setprecision(15);
    cerr << fixed << setprecision(15);
    int tc = 1;
	//cin >> tc;
    while(tc--) {
    	read();
        solve();

#ifdef _DEBUG
        cerr << "TIME = " << clock() - tt << endl;
        tt = clock();
#endif
    }
//dsdsd
    return 0;
}