#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main()
{
    ll i, j, l, u, v, w, x, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt,p, ans, mx, mn;
    ll m, k,n;
    ll low,hi,md,inp[MX],ff;
    ll pr[] = {500,1000,1500,2000,2500};
    ll tk[10];
    for(i=0;i<5;i++) cin >> inp[i];
    for(i=0;i<5;i++) cin>> tk[i];
    double sm=0,gt;
    for(i=0;i<5;i++)
    {
        w = tk[i];
        p = pr[i];
        m = inp[i];
        gt = max(0.3*p,((1-m/250.00)*p-50*w));
        sm+=gt;
    }
    cin >>a >> b;
    sm+=(a*100-b*50);
    printf("%.0lf",sm);

    return 0;
}

/*

*/


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main()
{
    ll i, j, l, u, v, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt, ans, mx, mn;
    ll k, n;
    ll pont[10] = {500, 1000, 1500, 2000, 2500};
    ll inp[10], tm[10];
    for(i = 0; i < 5; i++) cin >> inp[i];
    for(i = 0; i < 5; i++) cin >> tm[i];
    cin >> a >> b;
    ll tl = 0 ;
    double x, gt, w, m;
    double sm = 0.00, a1, a2, a3;
    for(i = 0; i < 5; i++)
    {
        x = pont[i];
        w = tm[i];
        m = inp[i];
//        gt = max((0.3 * x), ((1.00 - m / 250.00) * x - 50.00 * w));
//        cout<<gt<<" ";
        a1 = double(250.00 - m) / 250.00;
        a1 *= x;
        a1 -= double(50.00 * w);
        a1 = max(0.3 * x, a1);
        gt = a1;
//        cout<<a1<<endl;;
        sm += double(gt);
    }
    sm = sm + (a * 100 - b * 50);
    a = sm;
    cout << a << endl;
    return 0;
}

/*

*/


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main() {
    ll i, j, l, u, v, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt, sm, ans, mx, mn;
    ll k, n;
    ll pont[10] = {500, 1000, 1500, 2000, 2500};
    ll inp[10], tm[10];
    for(i = 0; i < 5; i++) cin >> inp[i];
    for(i = 0; i < 5; i++) cin >> tm[i];
    cin >> a >> b;
    ll tl = 0 ;
    double x, gt, w, m;
    sm = 0;
    for(i = 0; i < 5; i++) {
        x = pont[i];
        w = tm[i];
        m = inp[i];
        gt = max((0.3 * x), ((1 - m / 250.00) * x - 50 * w));
        sm += gt;
    }
    sm = sm + (a * 100 - b * 50);
    cout << sm << endl;
    return 0;
}

/*

*/


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main()
{
    ll i, j, l, u, v, w, x, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt, ans, mx, mn;
    ll m, k,n;
    ll pont[10] = {500, 1000, 1500, 2000, 2500};
    ll inp[10], tm[10];

    for(i = 0; i < 5; i++) cin >> inp[i];
    for(i = 0; i < 5; i++) cin >> tm[i];
    cin >> a >> b;

    double sm=0.00,gt,aa,a1;
    for(i=0;i<5;i++)
    {
        m = inp[i];
        w = tm[i];
        aa = double(pont[i]*.3);
        a1 = double((250.00-m)/250.000);
        a1 = double(a1*pont[i]);
        a1 = double(a1-50.00*w);
        sm+= double(max(aa,a1));
    }
    sm = sm+(a*100-b*50);
    u = sm;
    cout<<u<<endl;

    return 0;
}

/*

*/


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main()
{
    ll i, j, l, u, v, w, x, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt,p, ans, mx, mn;
    ll m, k,n;
    ll low,hi,md,inp[MX],ff;
    ll pr[] = {500,1000,1500,2000,2500};
    ll tk[10];
    for(i=0;i<5;i++) cin >> inp[i];
    for(i=0;i<5;i++) cin>> tk[i];
    double sm=0,gt;
    for(i=0;i<5;i++)
    {
        w = tk[i];
        p = pr[i];
        m = inp[i];
        gt = max(0.3*p,((1-m/250.00)*p-50*w));
        sm+=gt;
    }
    cin >>a >> b;
    sm+=(a*100-b*50);
//    printf("%.0lf",sm);
    cout<<sm<<endl;

    return 0;
}

/*

*/


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main() {
    ll i, j, l, u, v, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt,ans, mx, mn;
    ll k, n;
    ll pont[10] = {500, 1000, 1500, 2000, 2500};
    ll inp[10], tm[10];
    for(i = 0; i < 5; i++) cin >> inp[i];
    for(i = 0; i < 5; i++) cin >> tm[i];
    cin >> a >> b;
    ll tl = 0 ;
    double x, gt, w, m,sm=0;
    sm = 0;
    for(i = 0; i < 5; i++) {
        x = pont[i];
        w = tm[i];
        m = inp[i];
        gt = max((0.3 * x), ((1 - m / 250.00) * x - 50 * w));
        sm += gt;
    }
    sm = sm + (a * 100 - b * 50);
    cout << sm << endl;
    return 0;
}


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main()
{
    ll i, j, l, u, v, w, x, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt, ans, mx, mn;
    ll m, k,n;
    ll pont[10] = {500, 1000, 1500, 2000, 2500};
    ll inp[10], tm[10];
    double sm=00.00,gt,aa,a1;

    for(i = 0; i < 5; i++) cin >> inp[i];
    for(i = 0; i < 5; i++) cin >> tm[i];
    cin >> a >> b;

    for(i=0;i<5;i++)
    {
        m = double(inp[i]);
        w = double(tm[i]);
        x = double(pont[i]);
        aa = double(x*.3);

//        a1 = double((250.00*x-m*x) - 250.00*w*50.00);
        a1 = double(250*x - m*x);
        a1 = double(a1/250.00);
        a1-=(50.00*w);
        sm+= double(max(aa,a1));
    }
    sm = sm+(a*100-b*50);
//    u = (sm);
//    cout<<u<<endl;
    printf("%.0lf",sm);

    return 0;
}

/*

*/


#include<algorithm>
#include<cstdio>
#include<sstream>
#include<cstdlib>
#include<cctype>
#include<cmath>
#include<set>
#include<queue>
#include<stack>
#include<list>
#include<iostream>
#include<fstream>
#include<numeric>
#include<string>
#include<vector>
#include<cstring>
#include<map>
#include<iterator>
#include<deque>
#include<climits>
#include<complex>

using namespace std;
//-------------------------------------

#define ll long long
#define sc(x) scanf("%lld",&x)
#define sc2(x,y) scanf("%lld%lld",&x,&y)
#define sci(x) scanf("%d",&x)
#define sci2(x,y) scanf("%d%d",&x,&y)

#define mem(x) memset(x,0,sizeof x)
#define all(x) x.begin(),x.end()
#define pb(x)  push_back(x);
#define xx first
#define yy second
#define inf 999999999999999
#define mkp(x,y) make_pair(x,y)
#define pii pair<ll,ll>

//---------------------------------------

#define MX 100007
#define pi 2*acos(0.00)

#define open       freopen("input.txt","r",stdin)
#define close      freopen ("output.txt","w",stdout)

int main()
{
    ll i, j, l, u, v, y, z, a, b, c, d, e, f, t = 1, tc;
    ll flg, sz, cnt, ans, mx, mn;
    ll k, n;
    ll pont[10] = {500, 1000, 1500, 2000, 2500};
    ll inp[10], tm[10];
    for(i = 0; i < 5; i++) cin >> inp[i];
    for(i = 0; i < 5; i++) cin >> tm[i];
    cin >> a >> b;
    ll tl = 0 ;
    double x, gt, w, m;
    double sm = 0;
    for(i = 0; i < 5; i++)
    {
        x = pont[i];
        w = tm[i];
        m = inp[i];
        gt = max((0.3 * x), ((1.00 - m / 250.00) * x - 50.00 * w));
        sm += gt;
    }
    sm = sm + (a * 100 - b * 50);
    a = sm;
    cout << a << endl;
    return 0;
}

/*

*/


#include <bits/stdc++.h>
using namespace std;
int m[10],w[10];
double calc(int x,int m,int w)
{
	return max(0.3*x,(1.0-m*1.0/250)*x-50.0*w);
}
int main() {
	for(int i=1;i<=5;i++)cin>>m[i];
	for(int i=1;i<=5;i++)cin>>w[i];
	int hs,hu;
	cin>>hs>>hu;
	double ans=0.0;
	for(int i=1;i<=5;i++)ans+=calc(i*500,m[i],w[i]);
	ans+=100*hs;
	ans-=50*hu;
	cout<<(int)ans;
	return 0;
}


#include <bits/stdc++.h>

using namespace std;
const long double PI = acos(-1.0);
const int MAXN = 2E5 + 5;

template <class T>
void read(T &x, T f = 1, char ch = getchar()) {
    x = 0;
    while (ch < '0' || ch > '9') f = (ch == '-' ? -1 : 1), ch = getchar();
    while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
    x *= f;
}

struct Complex {
    double x, y;
    Complex(double _x = .0, double _y = .0) : x(_x), y(_y) {}
    Complex operator*(Complex other) {
        return Complex(x * other.x - y * other.y, x * other.y + y * other.x);
    }
    Complex operator+(Complex other) {
        return Complex(x + other.x, y + other.y);
    }
    Complex operator-(Complex other) {
        return Complex(x - other.x, y - other.y);
    }
};

void expand(int &sz) {
    if (__builtin_popcount(sz) != 1) sz = 1 << (1 + (int)log2(sz));
}

int rev(int x, int sz) {
    int ans = 0;
    for (int i = 0; i < sz; i++)
        if ((x >> i) & 1) ans |= (1 << (sz - i - 1));
    return ans;
}

int R[MAXN * 4];
void dft(Complex a[], int sz, int type) {
    for (int i = 0; i < sz; i++)
        if (i < R[i]) swap(a[i], a[R[i]]);
    for (int m = 2; m <= sz; m <<= 1) {
        Complex wm(cos(2 * PI / m), type * sin(2 * PI / m));
        for (int k = 0; k < sz; k += m) {
            Complex w(1);
            for (int j = 0; j < m / 2; j++) {
                Complex t = w * a[k + j + m / 2];
                Complex u = a[k + j];
                a[k + j] = u + t;
                a[k + j + m / 2] = u - t;
                w = w * wm;
            }
        }
    }
}

int a[MAXN], sum[MAXN], f[MAXN];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    int n, x;
    cin >> n >> x;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        if (a[i] < x)
            sum[i] = sum[i - 1] + 1;
        else
            sum[i] = sum[i - 1];
        f[sum[i]]++;
    }
    f[0]++;  //
    int N = 2 * n + 1;
    expand(N);
    for (int i = 0; i < N; i++) R[i] = rev(i, log2(N));
    Complex c[N];
    for (int i = 0; i <= n; i++) c[i].x = f[i], c[i].y = f[n - i];
    dft(c, N, 1);
    for (int i = 0; i < N; i++) c[i] = c[i] * c[i];
    dft(c, N, -1);
    long long ans0 = 0, p = 0;
    for (int i = 1; i <= n; i++) {
        if (sum[i] > sum[p])
            p = i;
        else
            ans0 += i - p;
    }
    cout << ans0 << " ";
    for (int k = 1; k <= n; k++)
        cout << (int)(c[n + k].y / 2.0 / N + 0.5) << " ";
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
const long double PI = acos(-1.0);
const int MAXN = 2E5 + 5;

template <class T>
void read(T &x, T f = 1, char ch = getchar()) {
    x = 0;
    while (ch < '0' || ch > '9') f = (ch == '-' ? -1 : 1), ch = getchar();
    while (ch >= '0' && ch <= '9') x = x * 10 + ch - 48, ch = getchar();
    x *= f;
}

struct Complex {
    double x, y;
    Complex(double _x = .0, double _y = .0) : x(_x), y(_y) {}
    Complex operator*(Complex other) {
        return Complex(x * other.x - y * other.y, x * other.y + y * other.x);
    }
    Complex operator+(Complex other) {
        return Complex(x + other.x, y + other.y);
    }
    Complex operator-(Complex other) {
        return Complex(x - other.x, y - other.y);
    }
};

void expand(int &sz) {
    if (__builtin_popcount(sz) != 1) sz = 1 << (1 + (int)log2(sz));
}

int rev(int x, int sz) {
    int ans = 0;
    for (int i = 0; i < sz; i++)
        if ((x >> i) & 1) ans |= (1 << (sz - i - 1));
    return ans;
}

int R[MAXN * 2];
void dft(Complex a[], int sz, int type) {
    for (int i = 0; i < sz; i++)
        if (i < R[i]) swap(a[i], a[R[i]]);
    for (int m = 2; m <= sz; m <<= 1) {
        Complex wm(cos(2 * PI / m), type * sin(2 * PI / m));
        for (int k = 0; k < sz; k += m) {
            Complex w(1);
            for (int j = 0; j < m / 2; j++) {
                Complex t = w * a[k + j + m / 2];
                Complex u = a[k + j];
                a[k + j] = u + t;
                a[k + j + m / 2] = u - t;
                w = w * wm;
            }
        }
    }
}

int a[MAXN], sum[MAXN], f[MAXN];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0), cout.tie(0);
    int n, x;
    cin >> n >> x;
    for (int i = 1; i <= n; i++) {
        cin >> a[i];
        if (a[i] < x)
            sum[i] = sum[i - 1] + 1;
        else
            sum[i] = sum[i - 1];
        f[sum[i]]++;
    }
    f[0]++;  //
    int N = 2 * n + 1;
    expand(N);
    for (int i = 0; i < N; i++) R[i] = rev(i, log2(N));
    Complex c[N];
    for (int i = 0; i <= n; i++) c[i].x = f[i], c[i].y = f[n - i];
    dft(c, N, 1);
    for (int i = 0; i < N; i++) c[i] = c[i] * c[i];
    dft(c, N, -1);
    int ans0 = 0, p = 0;
    for (int i = 1; i <= n; i++) {
        if (sum[i] > sum[p])
            p = i;
        else
            ans0 += i - p;
    }
    cout << ans0 << " ";
    for (int k = 1; k <= n; k++)
        cout << (int)(c[n + k].y / 2.0 / N + 0.5) << " ";
    return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define int long long
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//复数类型
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //三重循环
	    for(int mid=1;mid<n;mid<<=1){//为了一次处理两个相邻区间，实际上我们枚举区间左端点到中点的长度
	        double d=pi/mid;//2*pi/(mid*2)简化后
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//一次搞定两个区间
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//相当于递归版A0那一行
	                complex A1=w*A[l+k+mid];//相当于递归版A1那一行
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //别忘了逆变换要除n
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar();
		while(c<'0'||c>'9')c=getchar();
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,sum=0;
		a[n+1]=1;
		for(int i=1;i<=n+1;++i){
			if(a[i]==0)++sum;
			else ans0+=sum*(sum+1)/2,sum=0;
		}
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//复数类型
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //三重循环
	    for(int mid=1;mid<n;mid<<=1){//为了一次处理两个相邻区间，实际上我们枚举区间左端点到中点的长度
	        double d=pi/mid;//2*pi/(mid*2)简化后
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//一次搞定两个区间
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//相当于递归版A0那一行
	                complex A1=w*A[l+k+mid];//相当于递归版A1那一行
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //别忘了逆变换要除n
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar();
		while(c<'0'||c>'9')c=getchar();
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,head=1,tail=1;
		a[n+1]=-1;
		while(head<=n&&tail<=n){
			while(a[head]==1)++head,++tail;
			while(a[tail]==0)++tail;
			ans0+=(tail-head)*(tail-head+1)/2;
			head=tail;
		}
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//复数类型
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //三重循环
	    for(int mid=1;mid<n;mid<<=1){//为了一次处理两个相邻区间，实际上我们枚举区间左端点到中点的长度
	        double d=pi/mid;//2*pi/(mid*2)简化后
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//一次搞定两个区间
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//相当于递归版A0那一行
	                complex A1=w*A[l+k+mid];//相当于递归版A1那一行
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //别忘了逆变换要除n
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar();
		while(c<'0'||c>'9')c=getchar();
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,sum=0;
		a[n+1]=1;
		for(int i=1;i<=n+1;++i){
			if(a[i])ans0+=sum*(sum+1)/2,sum=0;
			else ++sum;
		}
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//复数类型
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //三重循环
	    for(int mid=1;mid<n;mid<<=1){//为了一次处理两个相邻区间，实际上我们枚举区间左端点到中点的长度
	        double d=pi/mid;//2*pi/(mid*2)简化后
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//一次搞定两个区间
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//相当于递归版A0那一行
	                complex A1=w*A[l+k+mid];//相当于递归版A1那一行
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //别忘了逆变换要除n
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar();
		while(c<'0'||c>'9')c=getchar();
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,sum=0;
		a[n+1]=1;
		for(int i=1;i<=n+1;++i){
			if(a[i]==0)++sum;
			else ans0+=sum*(sum+1)/2,sum=0;
		}
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//复数类型
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //三重循环
	    for(int mid=1;mid<n;mid<<=1){//为了一次处理两个相邻区间，实际上我们枚举区间左端点到中点的长度
	        double d=pi/mid;//2*pi/(mid*2)简化后
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//一次搞定两个区间
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//相当于递归版A0那一行
	                complex A1=w*A[l+k+mid];//相当于递归版A1那一行
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //别忘了逆变换要除n
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar();
		while(c<'0'||c>'9')c=getchar();
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,sum=0;
		a[n+1]=1;
		for(int i=1;i<=n+1;++i){
			if(a[i]==0)++sum;
			else ans0+=sum*(sum+1)/2,sum=0;
		}
		ans0+=sum;
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//¸´ÊýÀàÐÍ
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //ÈýÖØÑ»·
	    for(int mid=1;mid<n;mid<<=1){//ÎªÁËÒ»´Î´¦ÀíÁ½¸öÏàÁÚÇø¼ä£¬Êµ¼ÊÉÏÎÒÃÇÃ¶¾ÙÇø¼ä×ó¶Ëµãµ½ÖÐµãµÄ³¤¶È
	        double d=pi/mid;//2*pi/(mid*2)¼ò»¯ºó
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//Ò»´Î¸ã¶¨Á½¸öÇø¼ä
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//Ïàµ±ÓÚµÝ¹é°æA0ÄÇÒ»ÐÐ
	                complex A1=w*A[l+k+mid];//Ïàµ±ÓÚµÝ¹é°æA1ÄÇÒ»ÐÐ
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //±ðÍüÁËÄæ±ä»»Òª³ýn
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar(),f=c=='-'?-1:1;
		while(c<'0'||c>'9')c=getchar(),f=c=='-'?-1:f;
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res*f;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,head=1,tail=1;
		a[n+1]=-1;
		while(head<=n&&tail<=n){
			while(a[head]==1)++head,++tail;
			while(a[tail]==0)++tail;
			ans0+=(tail-head)*(tail-head+1)/2;
			head=tail;
		}
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//¸´ÊýÀàÐÍ
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //ÈýÖØÑ»·
	    for(int mid=1;mid<n;mid<<=1){//ÎªÁËÒ»´Î´¦ÀíÁ½¸öÏàÁÚÇø¼ä£¬Êµ¼ÊÉÏÎÒÃÇÃ¶¾ÙÇø¼ä×ó¶Ëµãµ½ÖÐµãµÄ³¤¶È
	        double d=pi/mid;//2*pi/(mid*2)¼ò»¯ºó
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//Ò»´Î¸ã¶¨Á½¸öÇø¼ä
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//Ïàµ±ÓÚµÝ¹é°æA0ÄÇÒ»ÐÐ
	                complex A1=w*A[l+k+mid];//Ïàµ±ÓÚµÝ¹é°æA1ÄÇÒ»ÐÐ
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //±ðÍüÁËÄæ±ä»»Òª³ýn
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar();
		while(c<'0'||c>'9')c=getchar();
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,sum=0;
		a[n+1]=1;
		for(int i=1;i<=n+1;++i){
			if(a[i]==0)++sum;
			else ans0+=sum*(sum+1)/2,sum=0;
		}
		ans0+=sum;
		printf("%d ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%d ",(int)(F[i].r+0.5));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
using std::swap;
#define int long long
namespace QiFeng233{
	const int maxn=4e6+10;
	const double pi=acos(-1);
	struct complex{//¸´ÊýÀàÐÍ
		double r,i;
    	complex(double r=0,double i=0):r(r),i(i){}
		complex operator+(const complex &a)const{
        	return complex(r+a.r,i+a.i);
		}
		complex operator*(const complex &a)const{
	        return complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
		void operator*=(const complex &a){
	        *this=complex(r*a.r-i*a.i,r*a.i+i*a.r);
	    }
	    complex operator-(const complex &a)const{
	        return complex(r-a.r,i-a.i);
	    }
	};
	complex F[maxn],G[maxn];
	int n,lim=1,L,rev[maxn],a[maxn],s[maxn],x;
	void FFT(complex *A,int n,int type){
		for(int i=0;i<n;++i){
			if(i>=rev[i])continue;
	        swap(A[i],A[rev[i]]);
	    }
	    //ÈýÖØÑ»·
	    for(int mid=1;mid<n;mid<<=1){//ÎªÁËÒ»´Î´¦ÀíÁ½¸öÏàÁÚÇø¼ä£¬Êµ¼ÊÉÏÎÒÃÇÃ¶¾ÙÇø¼ä×ó¶Ëµãµ½ÖÐµãµÄ³¤¶È
	        double d=pi/mid;//2*pi/(mid*2)¼ò»¯ºó
	        complex root=complex(cos(d),type*sin(d));
	        int r=mid<<1;//Ò»´Î¸ã¶¨Á½¸öÇø¼ä
	        for(int l=0;l<n;l+=r){
	            complex w=complex(1,0);
	            for(int k=0;k<mid;++k){
					complex A0=A[l+k];//Ïàµ±ÓÚµÝ¹é°æA0ÄÇÒ»ÐÐ
	                complex A1=w*A[l+k+mid];//Ïàµ±ÓÚµÝ¹é°æA1ÄÇÒ»ÐÐ
	                A[l+k]=A0+A1;
	                A[l+k+mid]=A0-A1;
	                w*=root;
	            }
			}
	    }
	    if(type==1)return;
	    //±ðÍüÁËÄæ±ä»»Òª³ýn
	    for(int i=0;i<n;++i)A[i].r/=(1.0*n);
	}
	int read(){
		int res=0,c=getchar(),f=c=='-'?-1:1;
		while(c<'0'||c>'9')c=getchar(),f=c=='-'?-1:f;
		while(c>='0'&&c<='9')res=res*10+c-'0',c=getchar();
		return res*f;
	}
	void solve(){
		n=read(),x=read();
		for(int i=1;i<=n;++i)a[i]=read()<x?1:0,s[i]=s[i-1]+a[i];
		for(int i=0;i<=n;++i)F[s[i]].r+=1.0;
		for(int i=0;i<=n;++i)G[i].r=F[n-i].r;
		while(lim<=2*n)lim<<=1,++L;
		--L;
		for(int i=0;i<=lim;++i)rev[i]=(rev[i>>1]>>1)|((i&1)<<L);
		FFT(F,lim,1);
		FFT(G,lim,1);
		for(int i=0;i<=lim;++i)F[i]*=G[i];
		FFT(F,lim,-1);
		int ans0=0,head=1,tail=1;
		a[n+1]=-1;
		while(head<=n&&tail<=n){
			while(a[head]==1)++head,++tail;
			while(a[tail]==0)++tail;
			ans0+=(tail-head)*(tail-head+1)/2;
			head=tail;
		}
		printf("%lld ",ans0);
		for(int i=n-1;i>=0;--i){
			printf("%lld ",(int)round(F[i].r));
		}
	}
}
signed main(){
	QiFeng233::solve();
	return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef complex<double> complex_t;

const int MAXN = 810000;
const double PI = acos(-1.0);
int n,x;
int a[MAXN];
ll res[MAXN],ans[MAXN];

namespace FFT{
  int r[MAXN];
  int init(int n){// n should be 2^k
    int len = 0;
    while((1<<len) < n) len++;
    for(int i = 0;i<(1<<len);i++) r[i] = (r[i>>1]>>1) | ((i&1) << (len-1));
    return (1<<len);
  }
  void fft(complex_t *P,int n,int op){
    for(int i = 0;i<n;i++) if(i < r[i]) swap(P[i],P[r[i]]);
    for(int i = 1;i<n;i<<=1){
      complex_t x(cos(PI/i),op * sin(PI/i));
      for(int j = 0;j<n;j+=(i<<1)){
        complex_t y(1,0);
        for(int k = 0;k<i;k++,y *= x){
          complex_t p = P[j+k],q = y * P[j+i+k];
          P[j+k] = p+q,P[j+i+k] = p-q;
        }
      }
    }
  }
}

void init(){
  scanf("%d %d",&n,&x);
  for(int i = 1;i<=n;i++){
    scanf("%d",&a[i]);
    a[i] = (a[i] < x ? 1 : 0);
  }
}

int cnt = 0;
complex_t X[MAXN],Y[MAXN];

void solve(){
  int tmp = 0;
  X[0] = Y[0] = 1;
  for(int i = 1;i<=n;i++){
    tmp += a[i];X[tmp] = X[tmp].real() + 1;
  }
  cnt = tmp;
  tmp = 0;
  for(int i = n;i>=1;--i){
    tmp += a[i];Y[tmp] = Y[tmp].real() + 1;
  }
  int t = FFT::init(n+n);
  FFT::fft(X,t,1),FFT::fft(Y,t,1);
  for(int i = 0;i<t;i++) X[i] *= Y[i];
  FFT::fft(X,t,-1);
  for(int i = 0;i<t;i++){
    res[i] = int(X[i].real()/t+0.5);
    ans[cnt-i] = res[i];
  }
  int last = 0;
  ans[0] = 0;
  a[n+1] = 1;
  for(int i = 1;i<=n+1;i++){
    if(a[i] == 1){
      // printf("%d:%d\n",i,last);
      ans[0] += last * (last + 1) / 2;
      last = 0;
    }
    else{
      last++;
    }
  }
  for(int i = 0;i<=n;i++){
    printf("%lld ",ans[i]);
  }
  printf("\n");
}

int main(){
  init();
  if(n == 1){
    if(a[1] >= x){
      printf("1 0\n");
    }
    else{
      printf("0 1\n");
    }
    return 0;
  }
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef complex<double> complex_t;

const int MAXN = 810000;
const double PI = acos(-1.0);
int n,x;
int a[MAXN];
ll res[MAXN],ans[MAXN];

namespace FFT{
  int r[MAXN];
  int init(int n){// n should be 2^k
    int len = 0;
    while((1<<len) < n) len++;
    for(int i = 0;i<(1<<len);i++) r[i] = (r[i>>1]>>1) | ((i&1) << (len-1));
    return (1<<len);
  }
  void fft(complex_t *P,int n,int op){
    for(int i = 0;i<n;i++) if(i < r[i]) swap(P[i],P[r[i]]);
    for(int i = 1;i<n;i<<=1){
      complex_t x(cos(PI/i),op * sin(PI/i));
      for(int j = 0;j<n;j+=(i<<1)){
        complex_t y(1,0);
        for(int k = 0;k<i;k++,y *= x){
          complex_t p = P[j+k],q = y * P[j+i+k];
          P[j+k] = p+q,P[j+i+k] = p-q;
        }
      }
    }
  }
}

void init(){
  scanf("%d %d",&n,&x);
  for(int i = 1;i<=n;i++){
    scanf("%d",&a[i]);
    a[i] = (a[i] < x ? 1 : 0);
  }
}

int cnt = 0;
complex_t X[MAXN],Y[MAXN];

void solve(){
  int tmp = 0;
  X[0] = Y[0] = 1;
  for(int i = 1;i<=n;i++){
    tmp += a[i];X[tmp] = X[tmp].real() + 1;
  }
  cnt = tmp;
  tmp = 0;
  for(int i = n;i>=1;--i){
    tmp += a[i];Y[tmp] = Y[tmp].real() + 1;
  }
  int t = FFT::init(n+n);
  FFT::fft(X,t,1),FFT::fft(Y,t,1);
  for(int i = 0;i<t;i++) X[i] *= Y[i];
  FFT::fft(X,t,-1);
  for(int i = 0;i<t;i++){
    res[i] = int(X[i].real()/t+0.5);
    ans[cnt-i] = res[i];
  }
  ll last = 0;
  ans[0] = 0;
  a[n+1] = 1;
  for(int i = 1;i<=n+1;i++){
    if(a[i] == 1){
      // printf("%d:%d\n",i,last);
      ans[0] += last * (last + 1) / 2;
      last = 0;
    }
    else{
      last++;
    }
  }
  for(int i = 0;i<=n;i++){
    printf("%lld ",ans[i]);
  }
  printf("\n");
}

int main(){
  init();
  if(n == 1){
    if(a[1] == 0){
      printf("1 0\n");
    }
    else{
      printf("0 1\n");
    }
    return 0;
  }
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef complex<double> complex_t;

const int MAXN = 410000;
const double PI = acos(-1.0);
int n,x;
int a[MAXN];
ll res[MAXN],ans[MAXN];

namespace FFT{
  int r[MAXN];
  int init(int n){// n should be 2^k
    int len = 0;
    while((1<<len) < n) len++;
    for(int i = 0;i<(1<<len);i++) r[i] = (r[i>>1]>>1) | ((i&1) << (len-1));
    return (1<<len);
  }
  void fft(complex_t *P,int n,int op){
    for(int i = 0;i<n;i++) if(i < r[i]) swap(P[i],P[r[i]]);
    for(int i = 1;i<n;i<<=1){
      complex_t x(cos(PI/i),op * sin(PI/i));
      for(int j = 0;j<n;j+=(i<<1)){
        complex_t y(1,0);
        for(int k = 0;k<i;k++,y *= x){
          complex_t p = P[j+k],q = y * P[j+i+k];
          P[j+k] = p+q,P[j+i+k] = p-q;
        }
      }
    }
  }
}

void init(){
  scanf("%d %d",&n,&x);
  for(int i = 1;i<=n;i++){
    scanf("%d",&a[i]);
    a[i] = (a[i] < x ? 1 : 0);
  }
}

int cnt = 0;
complex_t X[MAXN],Y[MAXN];

void solve(){
  int tmp = 0;
  X[0] = Y[0] = 1;
  for(int i = 1;i<=n;i++){
    tmp += a[i];X[tmp] = X[tmp].real() + 1;
  }
  cnt = tmp;
  tmp = 0;
  for(int i = n;i>=1;--i){
    tmp += a[i];Y[tmp] = Y[tmp].real() + 1;
  }
  int t = FFT::init(n+n);
  FFT::fft(X,t,1),FFT::fft(Y,t,1);
  for(int i = 0;i<t;i++) X[i] *= Y[i];
  FFT::fft(X,t,-1);
  for(int i = 0;i<t;i++){
    res[i] = int(X[i].real()/t+0.5);
    ans[cnt-i] = res[i];
  }
  int last = 0;
  ans[0] = 0;
  a[n+1] = 1;
  for(int i = 1;i<=n+1;i++){
    if(a[i] == 1){
      // printf("%d:%d\n",i,last);
      ans[0] += last * (last + 1) / 2;
      last = 0;
    }
    else{
      last++;
    }
  }
  for(int i = 0;i<=n;i++){
    printf("%lld ",ans[i]);
  }
  printf("\n");
}

int main(){
  init();
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef complex<double> complex_t;

const int MAXN = 810000;
const double PI = acos(-1.0);
int n,x;
int a[MAXN];
ll res[MAXN],ans[MAXN];

namespace FFT{
  int r[MAXN];
  int init(int n){// n should be 2^k
    int len = 0;
    while((1<<len) < n) len++;
    for(int i = 0;i<(1<<len);i++) r[i] = (r[i>>1]>>1) | ((i&1) << (len-1));
    return (1<<len);
  }
  void fft(complex_t *P,int n,int op){
    for(int i = 0;i<n;i++) if(i < r[i]) swap(P[i],P[r[i]]);
    for(int i = 1;i<n;i<<=1){
      complex_t x(cos(PI/i),op * sin(PI/i));
      for(int j = 0;j<n;j+=(i<<1)){
        complex_t y(1,0);
        for(int k = 0;k<i;k++,y *= x){
          complex_t p = P[j+k],q = y * P[j+i+k];
          P[j+k] = p+q,P[j+i+k] = p-q;
        }
      }
    }
  }
}

void init(){
  scanf("%d %d",&n,&x);
  for(int i = 1;i<=n;i++){
    scanf("%d",&a[i]);
    a[i] = (a[i] < x ? 1 : 0);
  }
}

int cnt = 0;
complex_t X[MAXN],Y[MAXN];

void solve(){
  int tmp = 0;
  X[0] = Y[0] = 1;
  for(int i = 1;i<=n;i++){
    tmp += a[i];X[tmp] = X[tmp].real() + 1;
  }
  cnt = tmp;
  tmp = 0;
  for(int i = n;i>=1;--i){
    tmp += a[i];Y[tmp] = Y[tmp].real() + 1;
  }
  int t = FFT::init(n+n);
  FFT::fft(X,t,1),FFT::fft(Y,t,1);
  for(int i = 0;i<t;i++) X[i] *= Y[i];
  FFT::fft(X,t,-1);
  for(int i = 0;i<t;i++){
    res[i] = int(X[i].real()/t+0.5);
    ans[cnt-i] = res[i];
  }
  int last = 0;
  ans[0] = 0;
  a[n+1] = 1;
  for(int i = 1;i<=n+1;i++){
    if(a[i] == 1){
      // printf("%d:%d\n",i,last);
      ans[0] += last * (last + 1) / 2;
      last = 0;
    }
    else{
      last++;
    }
  }
  for(int i = 0;i<=n;i++){
    printf("%lld ",ans[i]);
  }
  printf("\n");
}

int main(){
  init();
  solve();
  return 0;
}


#include <bits/stdc++.h>
#define ll long long
using namespace std;
typedef complex<double> complex_t;

const int MAXN = 810000;
const double PI = acos(-1.0);
int n,x;
int a[MAXN];
ll res[MAXN],ans[MAXN];

namespace FFT{
  int r[MAXN];
  int init(int n){// n should be 2^k
    int len = 0;
    while((1<<len) < n) len++;
    for(int i = 0;i<(1<<len);i++) r[i] = (r[i>>1]>>1) | ((i&1) << (len-1));
    return (1<<len);
  }
  void fft(complex_t *P,int n,int op){
    for(int i = 0;i<n;i++) if(i < r[i]) swap(P[i],P[r[i]]);
    for(int i = 1;i<n;i<<=1){
      complex_t x(cos(PI/i),op * sin(PI/i));
      for(int j = 0;j<n;j+=(i<<1)){
        complex_t y(1,0);
        for(int k = 0;k<i;k++,y *= x){
          complex_t p = P[j+k],q = y * P[j+i+k];
          P[j+k] = p+q,P[j+i+k] = p-q;
        }
      }
    }
  }
}

void init(){
  scanf("%d %d",&n,&x);
  for(int i = 1;i<=n;i++){
    scanf("%d",&a[i]);
    a[i] = (a[i] < x ? 1 : 0);
  }
}

int cnt = 0;
complex_t X[MAXN],Y[MAXN];

void solve(){
  int tmp = 0;
  X[0] = Y[0] = 1;
  for(int i = 1;i<=n;i++){
    tmp += a[i];X[tmp] = X[tmp].real() + 1;
  }
  cnt = tmp;
  tmp = 0;
  for(int i = n;i>=1;--i){
    tmp += a[i];Y[tmp] = Y[tmp].real() + 1;
  }
  int t = FFT::init(n+n);
  FFT::fft(X,t,1),FFT::fft(Y,t,1);
  for(int i = 0;i<t;i++) X[i] *= Y[i];
  FFT::fft(X,t,-1);
  for(int i = 0;i<t;i++){
    res[i] = (ll)(X[i].real()/t+0.5);
    ans[cnt-i] = res[i];
  }
  ll last = 0;
  ans[0] = 0;
  a[n+1] = 1;
  for(int i = 1;i<=n+1;i++){
    if(a[i] == 1){
      // printf("%d:%d\n",i,last);
      ans[0] += last * (last + 1) / 2;
      last = 0;
    }
    else{
      last++;
    }
  }
  for(int i = 0;i<=n;i++){
    printf("%lld ",ans[i]);
  }
  printf("\n");
}

int main(){
  init();
  if(n == 1){
    if(a[1] == 0){
      printf("1 0\n");
    }
    else{
      printf("0 1\n");
    }
    return 0;
  }
  solve();
  return 0;
}


#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 500;
const double Pi = acos(-1.0);
int n, x;
long long l, r[N], limit = 1, ans[N];
int a[N];
struct Complex {
	double x, y;
	Complex() {}
	Complex(double _x, double _y) :x(_x), y(_y) {}
	Complex operator + (const Complex & A) const { return Complex(x + A.x, y + A.y); }
	Complex operator - (const Complex & A) const { return Complex(x - A.x, y - A.y); }
	Complex operator * (const Complex & A) const { return Complex(x * A.x - y * A.y, x * A.y + y * A.x); }
	Complex operator / (const double & a) const { return Complex(x / a, y / a); }
	Complex operator *= (const Complex & A) { return *this = *this * A; }
}f[N], g[N];

void FFT(Complex *A, int type) {
	for (int i = 0; i < limit; i++) if (i < r[i]) swap(A[i], A[r[i]]);
	for (int mid = 1; mid < limit; mid <<= 1) {
		Complex Wn(cos(Pi / mid), type * sin(Pi / mid));
		for (int R = mid << 1, j = 0; j < limit; j += R) {
			Complex W(1, 0);
			for (int k = 0; k < mid; k++, W *= Wn) {
				Complex x = A[j + k], y = W * A[j + mid + k];
				A[j + k] = x + y;
				A[j + mid + k] = x - y;
			}
		}
	}
	if (!~type) for (int i = 0; i < limit; i++) f[i] = f[i] / (double) limit;
}

int main() {
	scanf("%d%d", &n, &x);
	for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i] = (a[i] < x) + a[i - 1], f[a[i - 1]].x++;
	for (int i = 1; i <= n; i++) g[a[n] - a[i]].x++;
	while (limit <= a[n] * 2) limit <<= 1, l++;
	for (int i = 0; i < limit; i++) r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
//	for (int i = 0; i < limit; i++) printf("%d ", r[i]); printf("\n");
//	for (int i = 0; i <= limit; i++) printf("%0.0lf ", f[i].x); printf("\n");
//	for (int i = 0; i <= limit; i++) printf("%0.0lf ", g[i].x); printf("\n");
	FFT(f, 1); FFT(g, 1);
//	for (int i = 0; i <= limit; i++) printf("%0.0lf ", f[i].x); printf("\n");
//	for (int i = 0; i <= limit; i++) printf("%0.0lf ", g[i].x); printf("\n");
	for (int i = 0; i <= limit; i++) f[i] *= g[i];
//	for (int i = 0; i <= limit; i++) printf("%0.0lf ", f[i].x); printf("\n");
	FFT(f, -1);
//	for (int i = 0; i <= limit; i++) printf("%0.0lf ", f[i].x); printf("\n");
	long long cnt = 0;
	for (int i = 1; i <= n; i++)
		if (a[i] == a[i - 1]) cnt++;
		else ans[0] += cnt * (cnt - 1) / 2 + cnt, cnt = 0;
	ans[0] += cnt * (cnt - 1) / 2 + cnt;
	for (int i = 0; i < a[n]; i++) ans[a[n] - i] = (long long)floor(f[i].x + 0.2);
	for (int i = 0; i <= n; i++) printf("%lld ", ans[i]); printf("\n");
	return 0;
}


//#pragma comment(linker,"/STACK:1024000000,1024000000")
//#pragma GCC optimize(3)
#include<bits/stdc++.h>
//#include<unordered_map>
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/hash_policy.hpp>
#define closeSync ios::sync_with_stdio(0);cin.tie(0);cout.tie(0)
#define multiCase int T;cin>>T;for(int t=1;t<=T;t++)
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define repp(i,a,b) for(int i=a;i<b;i++)
#define per(i,a,b) for(int i=a;i>=b;i--)
#define perr(i,a,b) for(int i=a;i>b;i--)
#define pb push_back
#define eb emplace_back
#define mst(a,b) memset(a,b,sizeof(a))
using namespace std;
//using namespace __gnu_pbds;
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,ll> P;
const int INF=0x3f3f3f3f;
const ll LINF=0x3f3f3f3f3f3f3f3f;
const double eps=1e-12;
const double PI=acos(-1.0);
const double angcst=PI/180.0;
const ll mod=998244353;
ll max_3(ll a,ll b,ll c){if(a>b&&a>c)return a;if(b>c)return b;return c;}
ll min_3(ll a,ll b,ll c){if(a<b&&a<c)return a;if(b<c)return b;return c;}
ll gcd(ll a,ll b){return b==0?a:gcd(b,a%b);}
ll qpow(ll a,ll n){ll r=1;while(n){if(n&1)r=(r*a)%mod;n>>=1;a=(a*a)%mod;}return r;}
ll qmul(ll a,ll b){ll s=(long double)a/mod*b;s=a*b-s*mod;if(s<0)s+=mod;if(s>=mod)s-=mod;return s;}

const int N=262144;

int n,cnt[N],s[N];
int lim=1,rev[N],h[N];

struct cp{
	double x,y;
	cp(double u=0,double v=0){x=u,y=v;}
	friend cp operator +(const cp &u,const cp &v){return cp(u.x+v.x,u.y+v.y);}
	friend cp operator -(const cp &u,const cp &v){return cp(u.x-v.x,u.y-v.y);}
	friend cp operator *(const cp &u,const cp &v){return cp(u.x*v.x-u.y*v.y,u.x*v.y+u.y*v.x);}
}f[1<<20],g[1<<20];

void FFT(cp *a,int tp){
	for(int i=0;i<lim;i++)if(i<rev[i])swap(a[i],a[rev[i]]);
	for(int md=1;md<lim;md<<=1){
		cp rt=cp(cos(PI/md),tp*sin(PI/md));
		for(int stp=md<<1,pos=0;pos<lim;pos+=stp){
			cp w=cp(1,0);
			for(int i=0;i<md;i++,w=w*rt){
				cp x=a[pos+i],y=w*a[pos+md+i];
				a[pos+i]=x+y;
				a[pos+md+i]=x-y;
			}
		}
	}
}

int calZeroSituation()
{
    int res=0,p=0;
    rep(i,1,n)
    {
        if(s[i]!=s[i-1])
            p=i;
        res+=i-p;
    }
    return res;
}

void solve()
{
    int x,d;
    cin>>n>>x;
    int lg=0;
    while(lim<=((n<<1)+1))
        lg++,lim<<=1;
    repp(i,0,lim)
        rev[i]=(rev[i>>1]>>1)|((i&1)<<(lg-1));
    cnt[0]++;
    rep(i,1,n)
    {
        cin>>d;
        s[i]=s[i-1]+(d<x);
        cnt[s[i]]++;
    }
    rep(i,0,n)
    {
        f[i]=cp(cnt[i],0.0);
        g[i]=cp(cnt[n-i],0.0);
    }
    FFT(f,1);
    FFT(g,1);
    repp(i,0,lim)
    {
        f[i]=f[i]*g[i]; //卷积计算点值表示法的答案
    }
    FFT(f,-1);
    rep(i,0,n)
        h[n-i]=f[i].x/lim+0.5;

    cout<<calZeroSituation();
    rep(i,1,n)
        cout<<' '<<h[i];

}
int main()
{
    closeSync;
    //multiCase
    {
        solve();
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define next Next
#define int long long
const int N=1e6+5;
const double P=acos(-1);
int n,x,s,len,bit,rev[N],sum[N],ans[N];
struct node{
    double x,y;
}a[N],b[N];
node operator + (node a,node b){return (node){a.x+b.x,a.y+b.y};}
node operator - (node a,node b){return (node){a.x-b.x,a.y-b.y};}
node operator * (node a,node b){return (node){a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x};}
void work(int n)
{
    for(int i=0;i<n;i++)
        rev[i]=(rev[i>>1]>>1)|((i&1)<<bit);
}
void fft(node *a,int n,int opt)
{
    for(int i=0;i<n;i++)
        if(i<rev[i])swap(a[i],a[rev[i]]);
    for(int i=2,ii=1;i<=n;i=i*2,ii=ii*2)
    {
    	node wn=(node){cos(2*opt*P/i),sin(2*opt*P/i)};
    	for(int j=0;j<n;j+=i)
    	{
    		node w=(node){1.0,0.0},t;
    		for(int k=0;k<ii;k++)
    		{
    			t=w*a[j+k+ii];
    			a[j+k+ii]=a[j+k]-t;
    			a[j+k]=a[j+k]+t;
    			w=w*wn;
    		}
    	}
    }
}
/*char buf[1<<21],*p1=buf,*p2=buf;
inline int gc(){return p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<21,stdin),p1==p2)?EOF:*p1++;}*/
#define gc getchar
inline int read()
{
	int ret=0,f=0;char c=gc();
	while(!isdigit(c)){if(c=='-')f=1;c=gc();}
	while(isdigit(c)){ret=ret*10+c-48;c=gc();}
	if(f)return -ret;return ret;
}
signed main()
{
	n=read();x=read();
	for(int i=1;i<=n;i++)sum[i]=sum[i-1]+(read()<x);
	for(int i=1;i<=n;i++)a[sum[i-1]].x++;
	for(int i=1;i<=n;i++)b[sum[n]-sum[i]].x++;
	s=1,bit=0,len=n+n;
	while(s<=len)
	{
		s=s*2;
		bit++;
	}
	bit--;
	work(s);
	fft(a,s,1);fft(b,s,1);
	for(int i=0;i<s;i++)a[i]=a[i]*b[i];
	fft(a,s,-1);
    int gs=0;
    for(int i=1;i<=n;i++)
        if(sum[i]==sum[i-1])gs++;
        else{
			ans[0]+=1ll*gs*(gs-1)/2+gs;
			gs=0;
		}
    ans[0]+=1ll*gs*(gs-1)/2+gs;
    for(int i=0;i<sum[n];i++)ans[sum[n]-i]=(int)(a[i].x/s+0.5);
    for(int i=0;i<=n;i++)printf("%lld ",ans[i]);
}
/*
给一个长度为n的序列和x，求小于x的数恰好有k个的区间个数，k要取遍1到n。
考虑左端点取每一个点时，在这个点左边的1的个数，若个数为t，则a[t]的系数加1,这样构造一个多项式A。
右端点取每一个点时，在这个点右边的1的个数，构造一个类似的多项式B。
那么A和B做卷积，第t项的系数就是区间外1的个数为t的区间个数。
*/


#include<bits/stdc++.h>
#define ll long long
using namespace std;
typedef complex<double> cp;
const int N=530000;
const double pi=acos(-1);
cp a[N],b[N],W,w,p;
int n=1,m,i,j,k,x,sum,R[N],lst=-1;ll ans;
inline void fft(cp*c,int t)
{
    for(i=0;i<n;i++) R[i]<i?
	swap(c[R[i]],c[i]),0:0;
    for(i=1;i<n;i<<=1)
     for(j=0,W={cos(pi/i),sin(pi/i)*t};j<n;j+=i<<1)
      for(k=0,w={1,0};k<i;k++,w=w*W)
       p=c[j+k+i]*w,c[j+k+i]=c[j+k]-p,c[j+k]=c[j+k]+p;
}
int main()
{
    scanf("%d%d",&m,&k);
    for(i=0;i<m;i++){
        a[sum]+=cp(1,0),scanf("%d",&x);
        x=x<k;
        sum+=x,b[sum]+=cp(1,0);
        if(x) lst=i;
        ans+=i-lst;
    }
    printf("%I64d ",ans);
    for(i=0;i<=sum>>1;i++) swap(a[i],a[sum-i]);
    for(;n<=sum<<1;n<<=1);
    for(i=1;i<n;i++) R[i]=R[i>>1]>>1|(i&1?n>>1:0);
    fft(a,1),fft(b,1);
    for(i=0;i<n;i++) a[i]=a[i]*b[i];
    fft(a,-1);
    for(i=1;i<=m;i++)
    printf("%I64d ",(ll)((a[i+sum].real()+0.5)/n));
}


#include<bits/stdc++.h>
using namespace std;
#define rep(i, a, b) for(int i = (a), i##_end_ = (b); i <= i##_end_; ++i)
#define drep(i, a, b) for(int i = (a), i##_end_ = (b); i >= i##_end_; --i)
#define clar(a, b) memset((a), (b), sizeof(a))
#define debug(...) fprintf(stderr, __VA_ARGS__)
typedef long long LL;
typedef long double LD;
const long double pi = acos(-1);
LL read() {
    char ch = getchar();
    LL x = 0, flag = 1;
    for (;!isdigit(ch); ch = getchar()) if (ch == '-') flag *= -1;
    for (;isdigit(ch); ch = getchar()) x = x * 10 + ch - 48;
    return x * flag;
}
void write(int x) {
    if (x < 0) putchar('-'), x = -x;
    if (x >= 10) write(x / 10);
    putchar(x % 10 + 48);
}

struct cpx {
	double real, imag;
	cpx (double a = 0, double b = 0) { real = a, imag = b; }
	cpx operator + (const cpx &a) const { return cpx(a.real + real, a.imag + imag); }
	cpx operator - (const cpx &a) const { return cpx(real - a.real, imag - a.imag); }
	cpx operator * (const cpx &a) const { return cpx(real * a.real - imag * a.imag, real * a.imag + imag * a.real); }
	cpx operator / (const double &a) const { return cpx(real / a, imag / a);}
	cpx operator - () const { return cpx(real, -imag);}
};
void reverse(cpx a[], int len) {
	int z = 0;
	while((1 << z) < len) ++z;
	rep(i, 0, len - 1) {
		int tmp = 0;
/**/	rep(j, 0, z) if(i & (1 << j)) tmp |= (1 << (z - j - 1));
		if(tmp > i) swap(a[i], a[tmp]);
	}
}
void DFT(cpx a[], int len, int wheinv) {
	reverse(a, len);

	for (int i = 2; i <= len; i <<= 1) {
/**/	cpx ur = cpx(cos(2 * pi / i), sin(wheinv * 2 * pi / i));
		for (int j = 0; j < len; j += i) {
/**/		cpx tmp = cpx(1, 0);
			rep (k, 0, i / 2 - 1) {
				cpx t = a[j + k + i / 2] * tmp;
/**/			a[j + k + i / 2] = a[j + k] - t;
				a[j + k] = a[j + k] + t;
				tmp = tmp * ur;
			}
		}
	}

	if (wheinv == -1) rep (i, 0, len - 1) a[i] = a[i] / len;
}

const int Maxn = 400009;
int n, x, a[Maxn];

void Init() {
	n = read(), x = read();
	rep (i, 1, n) a[i] = read();
}

int cnt[Maxn], f[Maxn];
cpx A[Maxn], B[Maxn];
LL ans[Maxn];

void Solve() {
/**/f[0] = 1;
	rep (i, 1, n) cnt[i] = cnt[i - 1] + (a[i] < x);
	rep (i, 1, n) ++f[cnt[i]];
	rep (i, 0, n) A[i].real = f[i], B[i].real = f[n - i];

	int len = 1;
	while (len <= 2 * n) len <<= 1;
	DFT(A, len, 1); DFT(B, len, 1);
	rep (i, 0, len) A[i] = A[i] * B[i];
	DFT(A, len, -1);

	rep (i, 0, n) ans[i] = (LL)(A[n + i].real + 0.5);
/**/ans[0] -= n + 1; ans[0] /= 2;
	rep (i, 0, n) printf("%lld ", ans[i]);
}

int main() {
//	freopen("cathedral.in", "r", stdin);
//	freopen("cathedral.out", "w", stdout);

	Init();
	Solve();

#ifdef Qrsikno
    debug("\nRunning time: %.3lf(s)\n", clock() * 1.0 / CLOCKS_PER_SEC);
#endif
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
int read()
{
    int d = 0, w = 1;
    char ch = getchar();
    while (ch != '-' && (ch < '0' || ch > '9'))
        ch = getchar();
    if (ch == '-')
        w = -1, ch = getchar();
    while (ch >= '0' && ch <= '9')
        d = d * 10 + ch - '0', ch = getchar();
    return d * w;
}
void write_(int x)
{
    if (x < 0)
        x = -x, putchar('-');
    if (x > 9)
        write_(x / 10);
    putchar(x % 10 + '0');
}
void writeln(int x)
{
    write_(x);
    putchar('\n');
}
void writesp(int x)
{
    write_(x);
    putchar(' ');
}
int A[550000], B[550000];
int r[550000];
int a[550000];
const int P = 998244353;
const int G = 3;
const int Gi = 332748118;
int power(int a, int b)
{
    int ans = 1;
    for (; b; b >>= 1, a = (long long)a * a % P)
        if (b & 1)
            ans = (long long)ans * a % P;
    return ans;
}
void NTT(int *A, int n, int opt)
{
    for (int i = 0; i < n; ++i)
        if (i < r[i])
            swap(A[i], A[r[i]]);
    for (int i = 1; i < n; i <<= 1)
    {
        int buf = power(opt == 1 ? G : Gi, (P - 1) / (i << 1));
        for (int j = 0; j < n; j += i << 1)
        {
            int w = 1;
            for (int k = 0; k < i; ++k, w = (long long)w * buf % P)
            {
                int p = A[j + k], q = (long long)w * A[j + k + i] % P;
                A[j + k] = (p + q) % P;
                A[j + k + i] = (p - q + P) % P;
            }
        }
    }
    if (opt == -1)
    {
        int inv = power(n, P - 2);
        for (int i = 0; i < n; ++i)
            A[i] = (long long)A[i] * inv % P;
    }
}
int main()
{
#ifdef __clang__
    freopen("data.in", "r", stdin);
    freopen("data.out", "w", stdout);
#endif
    int n = read(), x = read();
    A[0] = 1;
    for (int i = 1; i <= n; ++i)
        a[i] = (read() < x) + a[i - 1], ++A[a[i]];
    for (int i = 0; i <= n; ++i)
        B[n - i] = A[i];
    int m = n;
    int l = 0;
    for (m += n, n = 1; n <= m; n <<= 1)
        ++l;
    for (int i = 0; i < n; ++i)
        r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
    NTT(A, n, 1), NTT(B, n, 1);
    for (int i = 0; i < n; ++i)
        A[i] = (long long)A[i] * B[i] % P;
    NTT(A, n, -1);
    //for(int i = 0; i < n; ++i)
    //    cout << A[i] << " ";
    //cout << endl;
    for(int i = 1; i <= m /2; ++i)
        B[i] = A[m/2 - i];
    B[0] = 0;
    for (int i = 1, z = 0; i <= m / 2; ++i)
    {
        if (a[i] != a[i - 1])
            z = i;
        B[0] += i - z;
    }
    for (int i = 0; i <= m / 2; ++i)
        writesp(B[i]);
    return 0;
}


// start fold
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<algorithm>
#include<vector>
#include<cstring>
#include<set>
#include<map>
#include<cmath>
#include<queue>
#include<bitset>
using namespace std;
#define ri register int
#define il inline
#define LL long long
#define ull unsigned long long
#define pb push_back
#define mp make_pair
#define pairint pair<int,int>
#define fi first
#define se second
#define iv il void
#define enter putchar('\n')
#define size(x) ((int)x.size())
#define mem0(x) memset(x,0,sizeof(x))
template<class T>il void in(T &x)
{
	x=0; short f=1; char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-') f=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9') x=x*10+(c^'0'),c=getchar();
	x*=f;
}
template<class T>il void out(T x,const char c='\n')
{
	static short st[30];
	short m=0;
	if(x<0) putchar('-'),x=-x;
	do st[++m]=x%10,x/=10; while(x);
	while(m) putchar(st[m--]|'0');
	putchar(c);
}
namespace i207M
{

// end fold
#define N 800005
int n,lim;
int a[N];
struct cpx
{
	double x,y;
	cpx() {}
	cpx(const double &xx,const double &yy)
	{
		x=xx,y=yy;
	}
	friend cpx operator+(const cpx &a,const cpx &b)
	{
		return cpx(a.x+b.x,a.y+b.y);
	}
	friend cpx operator-(const cpx &a,const cpx &b)
	{
		return cpx(a.x-b.x,a.y-b.y);
	}
	friend cpx operator*(const cpx &a,const cpx &b)
	{
		return cpx(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);
	}
};
int r[N];
const double pi=acos(-1);
void dft(cpx f[],int n,int op)
{
	for(ri i=0; i<n; ++i) if(i<r[i]) swap(f[i],f[r[i]]);
	for(ri p=2; p<=n; p<<=1)
	{
		int len=p>>1;
		cpx nx(cos(pi/len),op*sin(pi/len));
		for(ri k=0; k<n; k+=p)
		{
			cpx w(1,0);
			for(ri i=k; i<k+len; ++i)
			{
				cpx t=f[i+len]*w;
				f[i+len]=f[i]-t;
				f[i]=f[i]+t;
				w=w*nx;
			}
		}
	}
	if(op==-1) for(ri i=0; i<n; ++i) f[i].x/=n;
}
LL calc0()
{
	LL res=0;
	for(ri i=1,p=0; i<=n; ++i)
	{
		if(a[i]!=a[i-1]) p=i;
		res+=i-p;
	}
	return res;
}
cpx f[N],g[N];
LL ans[N];
signed main()
{
#ifdef M207
	freopen("in.in","r",stdin);
#endif
	in(n),in(lim);
	g[0].x+=1;
	for(ri i=1; i<=n; ++i)
	{
		in(a[i]),a[i]=(a[i]<lim)+a[i-1];
		g[a[i]].x+=1;
	}
	for(ri i=0; i<=n; ++i) f[i]=g[n-i];
	int m=1;
	for(; m<=(n*2); m<<=1);
	for(ri i=1,hb=m>>1; i<m; ++i) r[i]=(r[i>>1]>>1)|((i&1)?hb:0);
	dft(f,m,1), dft(g,m,1);
	for(ri i=0; i<=m; ++i) f[i]=f[i]*g[i];
	dft(f,m,-1);
	for(ri i=1; i<=n; ++i) ans[i]=(f[n-i].x+0.5);
	ans[0]=calc0();
	for(ri i=0; i<=n; ++i) out(ans[i],' ');
	return 0;
}
// start fold
}

signed main()
{
	i207M::main();
	return 0;
}
// end fold


#include<bits/stdc++.h>
using namespace std;
typedef complex<double> Cp;
typedef long long LL;
const int N=6e5+10;
const double PI=acos(-1.0);
int n,m,l,X;
int cnt[N],r[N],G[N];
Cp A[N],B[N];
void FFT(Cp C[],int t) {
	for(int i=0;i<n;i++) if(i<r[i]) swap(C[i],C[r[i]]);
	for(int i=1;i<n;i<<=1) {
		Cp x(cos(PI/i),t*sin(PI/i));
		for(int j=0;j<n;j+=(i<<1)) {
			Cp y(1,0);
			for(int k=0;k<i;k++,y*=x) {
				Cp p=C[j+k],q=y*C[i+j+k];
				C[j+k]=p+q; C[i+j+k]=p-q;
			}
		}
	}
}
int main() {
	scanf("%d%d",&n,&X);
	int v,sum=0,tmp=n;
	for(int i=1;i<=n;i++) {
		scanf("%d",&v); v=v<X;
		sum+=v; G[i]=v;
		cnt[sum]++;
	}
	cnt[0]++;
	for(int i=0;i<=n;i++) A[i]=cnt[i],B[i]=cnt[n-i];
	m=n+n;
	for(n=1;n<=m;n<<=1) l++; l--;
	for(int i=0;i<n;i++) r[i]=(r[i>>1]>>1)|((i&1)<<l);
	FFT(B,1); FFT(A,1);
	for(int i=0;i<=n;i++) A[i]*=B[i];
	FFT(A,-1);
	LL ANS=0,t; G[0]=G[tmp+1]=1;
	for(int i=1;i<=tmp+1;i++) {
		if(G[i-1]&&!G[i]) t=1;
		else if(!G[i-1]&&!G[i]) t++;
		else if(!G[i-1]&&G[i]) ANS+=1ll*(1+t)*t/2;
	}
	printf("%lld ",ANS);
	for(int i=tmp+1;i<=tmp<<1;i++) printf("%lld ",(LL)(A[i].real()/n+0.5));
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define db double
#define ll long long
#define N 800005

struct cp{
	db r,i;
	cp(db rr=0,db ii=0){
		r=rr;
		i=ii;
	}
};
cp operator + (cp x,cp y){
	return cp(x.r+y.r,x.i+y.i);
}
cp operator - (cp x,cp y){
	return cp(x.r-y.r,x.i-y.i);
}
cp operator * (cp x,cp y){
	return cp(x.r*y.r-x.i*y.i,x.r*y.i+x.i*y.r);
}

const db pi=std::acos(-1.0);
int lmt,rev[N];
inline void build_fft(int len){
	for(lmt=1;lmt<=len;lmt<<=1);
	for(int i=0;i<lmt;i++)
		rev[i]=(rev[i>>1]>>1)|((i&1)*(lmt>>1));
}
inline void fft(cp *a,int tp){
	for(int i=0;i<lmt;i++)
		if(i<rev[i])
			std::swap(a[i],a[rev[i]]);
	for(int mid=1;mid<lmt;mid<<=1){
		cp omgn(std::cos(pi/mid),tp*std::sin(pi/mid));
		for(int i=0;i<lmt;i+=(mid<<1)){
			cp omg(1,0);
			for(int j=0;j<mid;j++,omg=omg*omgn){
				cp x=a[i+j],y=omg*a[i+j+mid];
				a[i+j]=x+y;
				a[i+j+mid]=x-y;
			}
		}
	}
	if(tp==-1)
		for(int i=0;i<lmt;i++)
			a[i]=cp(a[i].r/lmt,a[i].i/lmt);
}

int n,k;

ll ans0;

int len;
cp p[N];

int main(){
	scanf("%d%d",&n,&k);
	for(int i=1,tmp=0;i<=n;i++){
		int x;
		scanf("%d",&x);
		tmp++;
		if(x<k){
			p[len++].r=tmp;
			tmp=0;
		}
		if(i==n)
			p[len++].r=++tmp;
	}
	for(int i=0;i<len;i++)
		p[len-1-i].i=p[i].r;
	for(int i=0;i<len;i++)
		ans0+=1ll*(p[i].r-1)*p[i].r/2;
	build_fft(len<<1);
	fft(p,1);
	for(int i=0;i<lmt;i++)
		p[i]=p[i]*p[i];
	fft(p,-1);
	printf("%lld ",ans0);
	for(int i=1;i<=n;i++)
		printf("%lld ",i<=len?(ll)(p[len-1-i].i/2):0);
}


#include<bits/stdc++.h>
using namespace std;
namespace red{
#define int long long
#define lowbit(x) ((x)&(-x))
	inline int read()
	{
		int x=0;char ch,f=1;
		for(ch=getchar();(ch<'0'||ch>'9')&&ch!='-';ch=getchar());
		if(ch=='-') f=0,ch=getchar();
		while(ch>='0'&&ch<='9'){x=(x<<1)+(x<<3)+ch-'0';ch=getchar();}
		return f?x:-x;
	}
	const int N=1e6+10;
	double pi=acos(-1.0);
	int n,tmp,limit,len;
	int a[N],pos[N],ret[N];
	struct complex
	{
		double x,y;
		complex(double tx=0,double ty=0){x=tx,y=ty;}
		inline complex operator + (const complex &t) const
		{
			return complex(x+t.x,y+t.y);
		}
		inline complex operator - (const complex &t) const
		{
			return complex(x-t.x,y-t.y);
		}
		inline complex operator * (const complex &t) const
		{
			return complex(x*t.x-y*t.y,x*t.y+y*t.x);
		}
	}f[N],g[N];
	inline void fft(int limit,complex *a,int inv)
	{
		for(int i=0;i<limit;++i)
			if(i<pos[i]) swap(a[i],a[pos[i]]);
		for(int mid=1;mid<limit;mid<<=1)
		{
			complex Wn(cos(pi/mid),inv*sin(pi/mid));
			for(int r=mid<<1,j=0;j<limit;j+=r)
			{
				complex w(1,0);
				for(int k=0;k<mid;++k,w=w*Wn)
				{
					complex x=a[j+k],y=w*a[j+k+mid];
					a[j+k]=x+y;
					a[j+k+mid]=x-y;
				}
			}
		}
	}
	inline void main()
	{
		n=read(),tmp=read();
		for(int i=1;i<=n;++i) a[i]=(read()<tmp);
		f[0].x=1;
		for(int tmp=0,i=1;i<=n;++i)
		{
			tmp+=a[i];
			++f[tmp].x;
		}
		for(int i=1;i<=n;++i) g[i].x=f[n-i].x;
		for(limit=1;limit<=n+n;limit<<=1) ++len;
		for(int i=0;i<limit;++i) pos[i]=(pos[i>>1]>>1)|((i&1)<<(len-1));
		fft(limit,f,1);
		fft(limit,g,1);
		for(int i=0;i<limit;++i) f[i]=f[i]*g[i];
		fft(limit,f,-1);
		for(int tmp=0,sum=0,i=1;i<=n;++i)
		{
			if(!a[i]) ++sum;
			else
			{
				tmp+=((sum+1)*sum)>>1;
				sum=0;
			}
			if(i==n)
			{
				tmp+=((sum+1)*sum)>>1;
				printf("%lld ",tmp);
			}
		}
		for(int i=n+1;i<=n+n;++i) ret[i]=f[i].x/limit+0.5;
		for(int i=n+1;i<=n+n;++i) printf("%lld ",ret[i]);
	}
}
signed main()
{
	red::main();
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define N 800005
#define ll long long
ll n,x,lim=1;
ll sum[N],pos[N];
ll a[N],b[N],tot;
ll SB=0;
struct node{
	long double r,i;
}A[N],B[N],C[N];
const double pi=std::acos(-1);
node operator+(node a,node b){
	return (node){a.r+b.r,a.i+b.i};
}
node operator-(node a,node b){
	return (node){a.r-b.r,a.i-b.i};
}
node operator*(node a,node b){
	return (node){a.r*b.r-a.i*b.i,a.r*b.i+a.i*b.r};
}
void fft(node *a,ll f){
	for(ll i=0;i<lim;i++)
		if(i<pos[i]) std::swap(a[i],a[pos[i]]);
	for(ll len=2;len<=lim;len<<=1){
		ll mid=len>>1;
		node wn=(node){std::cos(2*pi/len),f*std::sin(2*pi/len)};
		for(ll l=0;l+len-1<lim;l+=len){
			node w=(node){1,0};
			for(ll k=0;k<mid;k++,w=w*wn){
				node x=a[l+k],y=a[l+k+mid]*w;
				a[l+k]=x+y;
				a[l+k+mid]=x-y;
			}
		}
	}
}
int main(){
	scanf("%lld%lld",&n,&x);
	for(ll i=0,tmp=0,k;i<n;i++){
		scanf("%lld",&k);
		tmp++;
		if(x>k){
			A[tot++].r=tmp;
			tmp=0;
		}
		if(i==n-1)
			A[tot++].r=++tmp;
	}
	for(ll i=0;i<tot;i++)
		SB+=(A[i].r-1)*A[i].r/2;
	for(ll i=0;i<tot;i++) B[i]=A[tot-i-1];
	while(lim<=tot*2) lim<<=1;
	for(ll i=0;i<lim;i++)
		pos[i]=(pos[i>>1]>>1)|((i&1)*(lim>>1));
	fft(A,1);fft(B,1);
	for(ll i=0;i<lim;i++)
		A[i]=A[i]*B[i];
	fft(A,-1);
	printf("%lld ",SB);
	for(ll i=1;i<=n;i++){
		printf("%lld ",i<tot?(ll)(A[tot-1-i].r/(long double)lim+0.5):0);
	}
}


/*
数据不清空，爆零两行泪。
多测不读完，爆零两行泪。
边界不特判，爆零两行泪。
贪心不证明，爆零两行泪。
D P 顺序错，爆零两行泪。
大小少等号，爆零两行泪。
变量不统一，爆零两行泪。
越界不判断，爆零两行泪。
调试不注释，爆零两行泪。
溢出不 l l，爆零两行泪。
*/
#include <bits/stdc++.h>
using namespace std;
#define fi			first
#define se			second
#define fz(i,a,b)	for(int i=a;i<=b;i++)
#define fd(i,a,b)	for(int i=a;i>=b;i--)
#define foreach(it,v) for(__typeof(v.begin()) it=v.begin();it!=v.end();it++)
#define put(x)		putchar(x)
#define eoln        put('\n')
#define space		put(' ')
inline int read(){
	int x=0,neg=1;char c=getchar();
	while(!isdigit(c)){
		if(c=='-')	neg=-1;
		c=getchar();
	}
	while(isdigit(c))	x=x*10+c-'0',c=getchar();
	return x*neg;
}
inline void print(int x){
	if(x<0){
		putchar('-');
		print(abs(x));
		return;
	}
	if(x<=9)	putchar(x+'0');
	else{
		print(x/10);
		putchar(x%10+'0');
	}
}
inline int qpow(int x,int e,int _MOD){
	int ans=1;
	while(e){
		if(e&1)	ans=ans*x%_MOD;
		x=x*x%_MOD;
		e>>=1;
	}
	return ans;
}
const double Pi=acos(-1.0);
struct comp{
	double x,y;
	comp(){x=y=0;}
	comp(double a,double b){x=a;y=b;}
	comp operator +(comp c){return comp(x+c.x,y+c.y);}
	comp operator -(comp c){return comp(x-c.x,y-c.y);}
	comp operator *(comp c){return comp(x*c.x-y*c.y,x*c.y+y*c.x);}
} a[1<<20],b[1<<20];
int rev[1<<20];
inline void FFT(int len,comp *a,int type){
	for(int i=0;i<len;i++){
		if(i<rev[i])	swap(a[i],a[rev[i]]);
	}
	for(int mid=1;mid<len;mid<<=1){
		comp W(cos(Pi/mid),type*sin(Pi/mid));
		for(int j=0;j<len;j+=mid<<1){
			comp w(1,0);
			for(int k=0;k<mid;k++){
				comp x=a[j+k],y=w*a[j+mid+k];
				a[j+k]=x+y;
				a[j+mid+k]=x-y;
				w=w*W;
			}
		}
	}
}
int n=read(),x=read(),cnt[300005],sum[300005];
signed main(){
	fz(i,1,n){
		int val=read();
		if(val<x)	sum[i]=sum[i-1]+1;
		else		sum[i]=sum[i-1];
		cnt[sum[i]]++;;
	}
	cnt[0]++;;
	int N=1,lg=0;
	while(N<=n*2)	N<<=1,lg++;
	for(int i=0;i<N;i++)	rev[i]=(rev[i>>1]>>1)|((i&1)<<(lg-1));
	for(int i=0;i<=n;i++)	a[i]=comp(cnt[i],0),b[i]=comp(cnt[n-i],0);
	FFT(N,a,1);
	FFT(N,b,1);
	for(int i=0;i<N;i++)	a[i]=a[i]*b[i];
	FFT(N,a,-1);
	int ans=0,lst=0;
	for(int i=1;i<=n;i++){
		if(sum[i]!=sum[i-1])	lst=i;
		ans+=i-lst;
	}
	cout<<ans<<" ";
	for(int i=n-1;~i;i--)	cout<<int(a[i].x/N+0.5)<<" ";
	return 0;
}


#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

int a[200010];
int n,k;

int work(int len)
{
 int ans  = 0;
 for (int i=len;i;i--) ans+=i;
 return ans+1;
}

int work2(int len,int t)
{ if (!t)return 0;
  return max(0,len-t+1);
}
int main()
{
    cin>>n>>k;
    for (int i=1;i<=n;i++)scanf("%d",&a[i]);
    int now = n;
    while (now>1&&a[now]>=k)now--;
    int sum=work(n-now);
    if (a[now]>k)
    {
     cout<<work(n)<<" ";
     for (int i=1;i<=n;i++)cout<<0<<" ";
     return 0;
    }
    //cout<<work(4,2);
    cout<<now<<" "<<sum<<endl;
    for (int i=0;i<=n;i++)
    {
      if (i==0)
      {
         cout<<sum-1<<" ";
         continue;
      }

       ll ans=0;
      ans+=work2(now,i);
      if (now>=i)ans+=n-now; printf("%d ",ans);
    }

}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define N 200005
#define ll long long
ll n,x,lim=1;
ll sum[N],pos[N];
ll a[N],b[N],tot;
ll SB=0;
struct node{
	double r,i;
}A[N],B[N],C[N];
const double pi=std::acos(-1);
node operator+(node a,node b){
	return (node){a.r+b.r,a.i+b.i};
}
node operator-(node a,node b){
	return (node){a.r-b.r,a.i-b.i};
}
node operator*(node a,node b){
	return (node){a.r*b.r-a.i*b.i,a.r*b.i+a.i*b.r};
}
void fft(node *a,ll f){
	for(ll i=0;i<lim;i++)
		if(i<pos[i]) std::swap(a[i],a[pos[i]]);
	for(ll len=2;len<=lim;len<<=1){
		ll mid=len>>1;
			node wn=(node){std::cos(2*pi/len),f*std::sin(2*pi/len)};
		for(ll l=0;l+len-1<lim;l+=len){
			node w=(node){1,0};
			for(ll k=0;k<mid;k++,w=w*wn){
				node x=a[l+k],y=a[l+k+mid]*w;
				a[l+k]=x+y;
				a[l+k+mid]=x-y;
			}
		}
	}
}
int main(){
	scanf("%lld%lld",&n,&x);
	for(ll i=0;i<n;i++){
		scanf("%lld",sum+i);
		if(sum[i]>=x) sum[i]=0;
		else sum[i]=1;
		if(sum[i]==1) a[tot++]=1;
		else a[tot]++;
		if(i)sum[i]+=sum[i-1];
	}
	a[tot++]++;
	for(ll i=0;i<tot;i++){
		SB+=(a[i]-1)*a[i]/2;
	}
//	for(ll i=0;i<tot;i++){
//		printf("%lld ",a[i]);
//	}
//	return 0;
	for(ll i=0;i<tot;i++) b[i]=a[tot-i-1];
	while(lim<tot*2) lim<<=1;
	for(ll i=0;i<lim;i++)
		pos[i]=(pos[i>>1]>>1)|(i&1)*(lim>>1);
	for(ll i=0;i<lim;i++){
		A[i]=(node){a[i],0};
		B[i]=(node){b[i],0};
	}
	fft(A,1);fft(B,1);
	for(ll i=0;i<lim;i++)
		A[i]=A[i]*B[i];
	fft(A,-1);
	printf("%lld ",SB);
	for(ll i=1;i<=n;i++){
		printf("%lld ",i<tot?(int)(A[tot-1-i].r/lim+0.5):0);
	}
}


#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
#define int long long
int read()
{
    int d = 0, w = 1;
    char ch = getchar();
    while (ch != '-' && (ch < '0' || ch > '9'))
        ch = getchar();
    if (ch == '-')
        w = -1, ch = getchar();
    while (ch >= '0' && ch <= '9')
        d = d * 10 + ch - '0', ch = getchar();
    return d * w;
}
void write_(int x)
{
    if (x < 0)
        x = -x, putchar('-');
    if (x > 9)
        write_(x / 10);
    putchar(x % 10 + '0');
}
void writeln(int x)
{
    write_(x);
    putchar('\n');
}
void writesp(int x)
{
    write_(x);
    putchar(' ');
}
int a[550000];
int r[550000];
struct complex
{
    double real, imag;
    complex()
    {
    }
    complex(double real, double imag)
    {
        this->real = real;
        this->imag = imag;
    }
} A[550000], B[550000];
complex operator+(const complex &a, const complex &b)
{
    return complex(a.real + b.real, a.imag + b.imag);
}
complex operator-(const complex &a, const complex &b)
{
    return complex(a.real - b.real, a.imag - b.imag);
}
complex operator*(const complex &a, const complex &b)
{
    return complex(a.real * b.real - a.imag * b.imag, a.imag * b.real + a.real * b.imag);
}
const double pi = acos(-1);
void FFT(complex *C, int n, int opt)
{
    for (int i = 0; i < n; ++i)
        if (i < r[i])
            swap(C[i], C[r[i]]);
    for (int i = 1; i < n; i <<= 1)
    {
        complex buf(cos(pi / i), opt * sin(pi / i));
        for (int j = 0; j < n; j += i << 1)
        {
            complex w(1, 0);
            for (int k = 0; k < i; ++k, w = w * buf)
            {
                complex p = C[j + k], q = w * C[j + k + i];
                C[j + k] = p + q;
                C[j + k + i] = p - q;
            }
        }
    }
}
signed main()
{
#ifdef __clang__
    freopen("data.in", "r", stdin);
    freopen("data.out", "w", stdout);
#endif
    int n = read(), x = read();
    A[0].real = 1;
    for (int i = 1; i <= n; ++i)
        a[i] = (read() < x) + a[i - 1], ++A[a[i]].real;
    for (int i = 0; i <= n; ++i)
        B[n - i] = A[i];
    int m = n;
    int l = 0;
    for (m += n, n = 1; n <= m; n <<= 1)
        ++l;
    for (int i = 0; i < n; ++i)
        r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
    FFT(A, n, 1), FFT(B, n, 1);
    for (int i = 0; i < n; ++i)
        A[i] = A[i] * B[i];
    FFT(A, n, -1);
    for (int i = 1; i <= m / 2; ++i)
        B[i].real = round(A[m / 2 - i].real / n);
    B[0].real = 0;
    for (int i = 1, z = 0; i <= m / 2; ++i)
    {
        if (a[i] != a[i - 1])
            z = i;
        (B[0].real += i - z);
    }
    for (int i = 0; i <= m / 2; ++i)
        writesp(round(B[i].real));
    return 0;
}


#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
const double PI = acos(-1.0);
struct Complex
 {
     double x,y;
     Complex(double _x = 0.0,double _y = 0.0)
     {
         x = _x;
         y = _y;
     }
     Complex operator - (const Complex &b) const
     {
         return Complex(x - b.x, y - b.y);
     }
     Complex operator + (const Complex &b) const
     {
         return Complex(x + b.x, y + b.y);
     }
     Complex operator * (const Complex &b) const
     {
         return Complex(x * b.x - y * b.y, x*b.y + y*b.x);
     }
 };
 void change(Complex y[], ll len)
 {
     ll i,j,k;
     for(i=1,j=len/2;i < len-1;i++)
     {
         if(i < j)
         {
             swap(y[i],y[j]);
         }
         k = len/2;
         while(j >= k)
         {
             j -= k;
             k /= 2;
         }
         if(j < k)
         {
             j += k;
         }
     }
     return ;
 }

 void fft(Complex y[],ll len,ll on)
 {
     change(y,len);
     for(ll h = 2;h<=len;h<<=1)
     {
         Complex wn(cos(-on*2*PI/h),sin(-on*2*PI/h));
         for(ll j = 0;j<len;j+=h)
         {
            Complex w(1,0);
            for(ll k = j;k<j+h/2;k++)
            {
                Complex u = y[k];
                Complex t = w*y[k+h/2];
                y[k] = u+t;
                y[k+h/2] = u-t;
                w = w*wn;
            }
         }
     }
     if(on == -1)
     {
         for(ll i = 0;i < len;i++)
         {
             y[i].x /= len;
         }
     }
 }
 const int maxn = 200005;
 Complex x[8*maxn],y[8*maxn];
 ll a[maxn];
 ll b[maxn];
 ll sum[maxn];

int main()
{
    ll n,d,k;
    scanf("%lld%lld",&n, &k);
    memset(a,0,sizeof(a));
    memset(b,0,sizeof(b));
    memset(sum,0,sizeof(sum));
    for(ll i = 0;i < n;i++)
    {
        scanf("%lld",&d);
        if(d < k) sum[i] = 1;
        else sum[i] = 0;
    }
    for(ll i = 1;i < n;i++)
    {
        sum[i] += sum[i-1];
        a[sum[i]]++;
    }
    a[0]++;
    a[sum[0]]++;
    for(ll i = 0;i <= n;i++) b[i] = a[n-i];

    ll len = 1;
    while(len <= (n << 1)) len<<=1;
    for(ll i = 0;i < len;i++)
    {
        x[i] = Complex(a[i],0);
        y[i] = Complex(b[i],0);
    }
    fft(x,len,1);
    fft(y,len,1);
    for(ll i = 0;i < len;i++) x[i] = x[i]*y[i];
    fft(x,len,-1);
    for(ll i =0;i < len;i++)
         sum[i] = (ll)(x[i].x + 0.5);

    sum[n] -= n+1;
    sum[n] /= 2;
    for(ll i = n;i>=0;i--)
        printf("%lld ",sum[i]);
    printf("\n");
    return 0;
}


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

typedef long long ll;

inline ll Read()
{
	ll f=1,x=0;
	char ch;
	do
	{
		ch=getchar();
		if(ch=='-')f=-1;
	}while(ch<'0' || ch>'9');
	do
	{
		x=(x<<3)+(x<<1)+ch-'0';
		ch=getchar();
	}while(ch<='9' && ch>='0');
	return f*x;
}

void write(ll x)
{
	if(x<0)x=-x,putchar('-');
	if(x>9)write(x/10);
	putchar(x%10+'0');
}

inline void Write(ll x)
{
	write(x);
	putchar('\n');
}

const ll N=4*1e6+10;
const double Pi=acos(-1.0);

struct Complex
{
	double x,y;
	Complex (double xx=0,double yy=0){x=xx,y=yy;}
}a[N],b[N];
Complex operator + (Complex a,Complex b){return Complex(a.x+b.x,a.y+b.y);}
Complex operator - (Complex a,Complex b){return Complex(a.x-b.x,a.y-b.y);}
Complex operator * (Complex a,Complex b){return Complex(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}
ll limit=1,l;
ll r[N],s[N],ans[N];
ll n,x;

inline void FFT(Complex *A,ll type)
{
	for(re ll i=0;i<limit;++i)
		if(i<r[i])swap(A[i],A[r[i]]);
	for(re ll mid=1;mid<limit;mid<<=1)
	{
		Complex Wn(cos(Pi/mid),type*sin(Pi/mid));
		for(re ll d=mid<<1,j=0;j<limit;j+=d)
		{
			Complex w(1.0);
			for(re ll k=0;k<mid;++k,w=w*Wn)
			{
				Complex x=A[j+k],y=w*A[j+mid+k];
				A[j+k]=x+y;
				A[j+mid+k]=x-y;
			}
		}
	}
}

inline ll Calc()
{
	ll res=0,p=0;
	for(re ll i=1;i<=n;++i)
	{
		if(s[i]!=s[i-1])p=i;
		res+=i-p;
	}
	return res;
}

int main()
{
//	freopen("a.in","r",stdin);
	n=Read(),x=Read();
	for(re ll i=1;i<=n;++i)
		s[i]=s[i-1]+(Read()<x);
	while(limit<=2*n)limit<<=1,++l;
	for(re ll i=0;i<=n;++i)
		a[s[i]].x++;
	for(re ll i=0;i<=n;++i)
		b[i]=a[n-i];

    for (ll i = 0; i < limit; i++)
        r[i]=(r[i>>1]>>1) | (i&1)<<(l-1);

	FFT(a,1);FFT(b,1);
	for(re ll i=0;i<=limit;++i)
		a[i]=a[i]*b[i];
	FFT(a,-1);
	for(re ll i=1;i<=2*n;++i)
		ans[i]=a[i+n].x/limit+0.5;
	ans[0]=Calc();
	write(ans[0]),putchar(' ');
	for(re ll i=1;i<=n;++i)
		write(ans[i]),putchar(' ');
	return 0;
}


#include<bits/stdc++.h>
clock_t t=clock();
namespace my_std{
	using namespace std;
	#define pii pair<int,int>
	#define fir first
	#define sec second
	#define MP make_pair
	#define rep(i,x,y) for (int i=(x);i<=(y);i++)
	#define drep(i,x,y) for (int i=(x);i>=(y);i--)
	#define go(x) for (int i=head[x];i;i=edge[i].nxt)
	#define templ template<typename T>
	#define sz 800202
	typedef long long ll;
	typedef double db;
	mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
	templ inline T rnd(T l,T r) {return uniform_int_distribution<T>(l,r)(rng);}
	templ inline bool chkmax(T &x,T y){return x<y?x=y,1:0;}
	templ inline bool chkmin(T &x,T y){return x>y?x=y,1:0;}
	templ inline void read(T& t)
	{
		t=0;char f=0,ch=getchar();double d=0.1;
		while(ch>'9'||ch<'0') f|=(ch=='-'),ch=getchar();
		while(ch<='9'&&ch>='0') t=t*10+ch-48,ch=getchar();
		if(ch=='.'){ch=getchar();while(ch<='9'&&ch>='0') t+=d*(ch^48),d*=0.1,ch=getchar();}
		t=(f?-t:t);
	}
	template<typename T,typename... Args>inline void read(T& t,Args&... args){read(t); read(args...);}
	char sr[1<<21],z[20];int C=-1,Z=0;
    inline void Ot(){fwrite(sr,1,C+1,stdout),C=-1;}
    inline void print(register int x)
    {
    	if(C>1<<20)Ot();if(x<0)sr[++C]='-',x=-x;
    	while(z[++Z]=x%10+48,x/=10);
    	while(sr[++C]=z[Z],--Z);sr[++C]='\n';
    }
	void file()
	{
		#ifndef ONLINE_JUDGE
		freopen("a.in","r",stdin);
		#endif
	}
	inline void chktime()
	{
		#ifndef ONLINE_JUDGE
		cout<<(clock()-t)/1000.0<<'\n';
		#endif
	}
	#ifdef mod
	ll ksm(ll x,int y){ll ret=1;for (;y;y>>=1,x=x*x%mod) if (y&1) ret=ret*x%mod;return ret;}
	ll inv(ll x){return ksm(x,mod-2);}
	#else
	ll ksm(ll x,int y){ll ret=1;for (;y;y>>=1,x=x*x) if (y&1) ret=ret*x;return ret;}
	#endif
//	inline ll mul(ll a,ll b){ll d=(ll)(a*(double)b/mod+0.5);ll ret=a*b-d*mod;if (ret<0) ret+=mod;return ret;}
}
using namespace my_std;

int n,x;
int a[sz];
int L[sz],R[sz];

const db PI=acos(-1.0);
struct Complex
{
	db x,y;
	Complex(db xx=0,db yy=0){x=xx,y=yy;}
};
const Complex operator + (const Complex &a,const Complex &b) {return Complex(a.x+b.x,a.y+b.y);}
const Complex operator - (const Complex &a,const Complex &b) {return Complex(a.x-b.x,a.y-b.y);}
const Complex operator * (const Complex &a,const Complex &b) {return Complex(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}

int limit,r[sz];
void FFT_init(int n)
{
	int l=-1;limit=1;
	while (limit<=n+n) ++l,limit<<=1;
	rep(i,0,limit-1) r[i]=(r[i>>1]>>1)|((i&1)<<l);
}
void FFT(Complex *a,int type)
{
    for (int i=0;i<limit;i++) if (i<r[i]) swap(a[i],a[r[i]]);
    for (int mid=1;mid<limit;mid<<=1)
    {
        Complex Wn(cos(PI/mid),type*sin(PI/mid));
        for (int len=mid<<1,j=0;j<limit;j+=len)
        {
            Complex w(1,0);
            for (int k=0;k<mid;k++,w=w*Wn)
            {
                Complex x=a[j+k],y=w*a[j+mid+k];
                a[j+k]=x+y;a[j+k+mid]=x-y;
            }
        }
    }
}
Complex _a[sz],_b[sz];

ll ans[sz];
ll CC(int n){return 1ll*n*(n+1)/2;}

int main()
{
	file();
	int cnt,c,cc;
	read(n,x);
	rep(i,1,n) read(a[i]);
	cnt=c=0;
	rep(i,1,n)
		if (a[i]<x) L[++c]=cnt+1,cnt=0;
		else ++cnt;
	cnt=0;cc=c;
	drep(i,n,1)
		if (a[i]<x) R[c--]=cnt+1,cnt=0;
		else ++cnt;
	reverse(L+1,L+cc+1);
	rep(i,1,cc) _a[i].x=L[i],_b[i].x=R[i];
	FFT_init(cc+1);
	FFT(_a,1);FFT(_b,1);
	rep(i,0,limit-1) _a[i]=_a[i]*_b[i];
	FFT(_a,-1);
	rep(i,1,n) ans[i]=ll(_a[i+cc].x/limit+0.5);
	if (cc)
	{
		rep(i,1,cc) ans[0]+=CC(R[i]-1);
		ans[0]+=CC(L[cc]-1);
	} else ans[0]=CC(n);
	rep(i,0,n) printf("%lld ",ans[i]);
	return 0;
}


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

typedef long long ll;

inline int Read()
{
	int f=1,x=0;
	char ch;
	do
	{
		ch=getchar();
		if(ch=='-')f=-1;
	}while(ch<'0' || ch>'9');
	do
	{
		x=(x<<3)+(x<<1)+ch-'0';
		ch=getchar();
	}while(ch<='9' && ch>='0');
	return f*x;
}

void write(int x)
{
	if(x<0)x=-x,putchar('-');
	if(x>9)write(x/10);
	putchar(x%10+'0');
}

inline void Write(int x)
{
	write(x);
	putchar('\n');
}

const int N=4*1e6+10;
const double Pi=acos(-1.0);

struct Complex
{
	double x,y;
	Complex (double xx=0,double yy=0){x=xx,y=yy;}
}a[N],b[N];
Complex operator + (Complex a,Complex b){return Complex(a.x+b.x,a.y+b.y);}
Complex operator - (Complex a,Complex b){return Complex(a.x-b.x,a.y-b.y);}
Complex operator * (Complex a,Complex b){return Complex(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}
int limit=1,l;
int r[N],s[N],ans[N];
int n,x;

inline void FFT(Complex *A,int type)
{
	for(re int i=0;i<limit;++i)
		if(i<r[i])swap(A[i],A[r[i]]);
	for(re int mid=1;mid<limit;mid<<=1)
	{
		Complex Wn(cos(Pi/mid),type*sin(Pi/mid));
		for(re int d=mid<<1,j=0;j<limit;j+=d)
		{
			Complex w(1.0);
			for(re int k=0;k<mid;++k,w=w*Wn)
			{
				Complex x=A[j+k],y=w*A[j+mid+k];
				A[j+k]=x+y;
				A[j+mid+k]=x-y;
			}
		}
	}
}

inline int Calc()
{
	int res=0,p=0;
	for(re int i=1;i<=n;++i)
	{
		if(s[i]!=s[i-1])p=i;
		res+=i-p;
	}
	return res;
}

int main()
{
//	freopen("a.in","r",stdin);
	n=Read(),x=Read();
	for(re int i=1;i<=n;++i)
		s[i]=s[i-1]+(Read()<x);
	while(limit<=2*n)limit<<=1,++l;
	for(re int i=0;i<=n;++i)
		a[s[i]].x++;
	for(re int i=0;i<=n;++i)
		b[i]=a[n-i];

    for (int i = 0; i < limit; i++)
        r[i]=(r[i>>1]>>1) | (i&1)<<(l-1);

	FFT(a,1);FFT(b,1);
	for(re int i=0;i<=limit;++i)
		a[i]=a[i]*b[i];
	FFT(a,-1);
	for(re int i=1;i<=2*n;++i)
		ans[i]=a[i+n].x/limit+0.5;
	ans[0]=Calc();
	write(ans[0]),putchar(' ');
	for(re int i=1;i<=n;++i)
		write(ans[i]),putchar(' ');
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define rg register
#define rep(i,a,b) for (rg int i=a;i<=b;i++)
#define per(i,a,b) for (rg int i=b;i>=a;i--)
#define pb push_back
#define lowbit(x) (x&(-x))
#define mk make_pair
#define VI vector<int>
#define il inline
#define ll long long
#define db double
#define ld long double
#define inf 0x3f3f3f3f
#define getc() (p1==p2&&(p2=(p1=buf)+fread(buf,1,1<<15,stdin),p1==p2)?EOF:*p1++)
char buf[1<<15],*p1 = buf,*p2 = buf;
inline ll read(){
    #define num ch-'0'
    char ch;bool flag=0;ll res;
    while(!isdigit(ch=getc()))
    (ch=='-')&&(flag=true);
    for(res=num;isdigit(ch=getc());res=res*10ll+num);
    (flag)&&(res=-res);
    #undef num
    return res;
}
inline void write(ll x){
	if (x < 0) x = ~x + 1ll, putchar('-');
	if (x > 9) write(x / 10ll);
	putchar(x % 10ll + '0');
}
#define mid ((l + r)>>1)
#define ls (x<<1)
#define rs ((x<<1)|1)
#undef mid
#undef ls
#undef rs
#define maxn 2000007
ll wn[maxn],inv_wn[maxn];
int rr[maxn];
int len,l,n,m;
ll A[maxn],B[maxn];
const ll mod=1004535809,gg=3;
ll fpow(ll a,ll v)
{
	ll tmp=a,ans=1;
	while(v)
	{
		if(v&1) ans=ans*tmp%mod;
		tmp=tmp*tmp%mod,v>>=1;
	}
	return ans%mod;
}
void init()
{
	for(rg int i=1;i<=4*(n);i++)
	wn[i]=fpow(gg,(mod-1)/(1ll*(ll)i*2)),inv_wn[i]=fpow(wn[i],mod-2);
}
il void ntt(ll *a,int t)
{
	for(rg int i=0;i<len;i++)
	if(i<rr[i]) swap(a[i],a[rr[i]]);
	for(rg int mid=1;mid<len;mid<<=1)
	{
		rg ll wwn;
		if(t==1) wwn=wn[mid]; else wwn=inv_wn[mid];
		for(rg int r=mid<<1,j=0;j<len;j+=r)
		{
			ll w=1;
			for(rg int k=0;k<mid;k++,w=w*wwn%mod)
			{
				rg ll x=a[j+k],y=a[j+k+mid]*w%mod;
				a[j+k]=(x+y)%mod;
				a[j+k+mid]=(x-y+mod)%mod;
			}
		}
	}
	if(t==-1)
	{
		rg ll iv=fpow(len,mod-2);
		for(rg int i=0;i<len;i++)
		a[i]=a[i]*iv%mod;
	}
}
ll sum[maxn];
ll s[maxn];
ll getans()
{
	ll ans = 0;
	int pos = 0;
	rep(i,1,n)
	{
		if(sum[i] != sum[i - 1]) pos = i;
		ans += i-pos;
	}
	return ans;
}
void solve()
{
	n = read();
	ll X = read();s[0] = 1;ll z;
	rep(i,1,n)
	(z=read()),sum[i] = sum[i-1] + (z < X),s[sum[i]]++;
	init();
	rep(i,0,n) A[i] = B[n-i] = s[i];
	l=0,len=1;
	while(len<(n+n)) len<<=1,l++;
	for(rg int i=0;i<=len;i++) rr[i]=(rr[i>>1]>>1)|((i&1)<<(l-1));
	ntt(A,1);
	ntt(B,1);
	rep(i,0,len) A[i] = (A[i] * B[i]) % mod;
	ntt(A,-1);
	cout<<getans()<<" ";
	per(i,0,n-1) cout<<A[i] % mod<<" ";
}
int main()
{
	#ifndef ONLINE_JUDGE
	freopen("data.txt","r",stdin);
	#endif
//	int T = read();
//	while(T--)

	solve();
}


#include<bits/stdc++.h>
clock_t t=clock();
namespace my_std{
	using namespace std;
	#define pii pair<int,int>
	#define fir first
	#define sec second
	#define MP make_pair
	#define rep(i,x,y) for (int i=(x);i<=(y);i++)
	#define drep(i,x,y) for (int i=(x);i>=(y);i--)
	#define go(x) for (int i=head[x];i;i=edge[i].nxt)
	#define templ template<typename T>
	#define sz 400202
	typedef long long ll;
	typedef double db;
	mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
	templ inline T rnd(T l,T r) {return uniform_int_distribution<T>(l,r)(rng);}
	templ inline bool chkmax(T &x,T y){return x<y?x=y,1:0;}
	templ inline bool chkmin(T &x,T y){return x>y?x=y,1:0;}
	templ inline void read(T& t)
	{
		t=0;char f=0,ch=getchar();double d=0.1;
		while(ch>'9'||ch<'0') f|=(ch=='-'),ch=getchar();
		while(ch<='9'&&ch>='0') t=t*10+ch-48,ch=getchar();
		if(ch=='.'){ch=getchar();while(ch<='9'&&ch>='0') t+=d*(ch^48),d*=0.1,ch=getchar();}
		t=(f?-t:t);
	}
	template<typename T,typename... Args>inline void read(T& t,Args&... args){read(t); read(args...);}
	char sr[1<<21],z[20];int C=-1,Z=0;
    inline void Ot(){fwrite(sr,1,C+1,stdout),C=-1;}
    inline void print(register int x)
    {
    	if(C>1<<20)Ot();if(x<0)sr[++C]='-',x=-x;
    	while(z[++Z]=x%10+48,x/=10);
    	while(sr[++C]=z[Z],--Z);sr[++C]='\n';
    }
	void file()
	{
		#ifndef ONLINE_JUDGE
		freopen("a.in","r",stdin);
		#endif
	}
	inline void chktime()
	{
		#ifndef ONLINE_JUDGE
		cout<<(clock()-t)/1000.0<<'\n';
		#endif
	}
	#ifdef mod
	ll ksm(ll x,int y){ll ret=1;for (;y;y>>=1,x=x*x%mod) if (y&1) ret=ret*x%mod;return ret;}
	ll inv(ll x){return ksm(x,mod-2);}
	#else
	ll ksm(ll x,int y){ll ret=1;for (;y;y>>=1,x=x*x) if (y&1) ret=ret*x;return ret;}
	#endif
//	inline ll mul(ll a,ll b){ll d=(ll)(a*(double)b/mod+0.5);ll ret=a*b-d*mod;if (ret<0) ret+=mod;return ret;}
}
using namespace my_std;

int n,x;
int a[sz];
int L[sz],R[sz];

const db PI=acos(-1.0);
struct Complex
{
	db x,y;
	Complex(db xx=0,db yy=0){x=xx,y=yy;}
};
const Complex operator + (const Complex &a,const Complex &b) {return Complex(a.x+b.x,a.y+b.y);}
const Complex operator - (const Complex &a,const Complex &b) {return Complex(a.x-b.x,a.y-b.y);}
const Complex operator * (const Complex &a,const Complex &b) {return Complex(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}

int limit,r[sz];
void FFT_init(int n)
{
	int l=-1;limit=1;
	while (limit<=n+n) ++l,limit<<=1;
	rep(i,0,limit-1) r[i]=(r[i>>1]>>1)|((i&1)<<l);
}
void FFT(Complex *a,int type)
{
    for (int i=0;i<limit;i++) if (i<r[i]) swap(a[i],a[r[i]]);
    for (int mid=1;mid<limit;mid<<=1)
    {
        Complex Wn(cos(PI/mid),type*sin(PI/mid));
        for (int len=mid<<1,j=0;j<limit;j+=len)
        {
            Complex w(1,0);
            for (int k=0;k<mid;k++,w=w*Wn)
            {
                Complex x=a[j+k],y=w*a[j+mid+k];
                a[j+k]=x+y;a[j+k+mid]=x-y;
            }
        }
    }
}
Complex _a[sz],_b[sz];

ll ans[sz];
ll CC(int n){return 1ll*n*(n+1)/2;}

int main()
{
	file();
	int cnt,c,cc;
	read(n,x);
	rep(i,1,n) read(a[i]);
	cnt=c=0;
	rep(i,1,n)
		if (a[i]<x) L[++c]=cnt+1,cnt=0;
		else ++cnt;
	cnt=0;cc=c;
	drep(i,n,1)
		if (a[i]<x) R[c--]=cnt+1,cnt=0;
		else ++cnt;
	reverse(L+1,L+cc+1);
	rep(i,1,cc) _a[i].x=L[i],_b[i].x=R[i];
	FFT_init(cc+1);
	FFT(_a,1);FFT(_b,1);
	rep(i,0,limit-1) _a[i]=_a[i]*_b[i];
	FFT(_a,-1);
	rep(i,1,n) ans[i]=ll(_a[i+cc].x/limit+0.5);
	if (cc)
	{
		rep(i,1,cc) ans[0]+=CC(R[i]-1);
		ans[0]+=CC(L[cc]-1);
	} else ans[0]=CC(n);
	rep(i,0,n) printf("%lld ",ans[i]);
	return 0;
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define N 800005
#define ll long long
ll n,x,lim=1;
ll sum[N],pos[N];
ll a[N],b[N],tot;
ll SB=0;
struct node{
	long double r,i;
}A[N],B[N],C[N];
const double pi=std::acos(-1);
node operator+(node a,node b){
	return (node){a.r+b.r,a.i+b.i};
}
node operator-(node a,node b){
	return (node){a.r-b.r,a.i-b.i};
}
node operator*(node a,node b){
	return (node){a.r*b.r-a.i*b.i,a.r*b.i+a.i*b.r};
}
void fft(node *a,ll f){
	for(ll i=0;i<lim;i++)
		if(i<pos[i]) std::swap(a[i],a[pos[i]]);
	for(ll len=2;len<=lim;len<<=1){
		ll mid=len>>1;
		node wn=(node){std::cos(2*pi/len),f*std::sin(2*pi/len)};
		for(ll l=0;l+len-1<lim;l+=len){
			node w=(node){1,0};
			for(ll k=0;k<mid;k++,w=w*wn){
				node x=a[l+k],y=a[l+k+mid]*w;
				a[l+k]=x+y;
				a[l+k+mid]=x-y;
			}
		}
	}
}
int main(){
	scanf("%lld%lld",&n,&x);
	for(ll i=0,tmp=0,k;i<n;i++){
		scanf("%lld",&k);
		if(x>k) A[tot++].r=1.0;
		else A[tot].r++;
	}
    A[tot++].r++；
	for(ll i=0;i<tot;i++)
		SB+=(A[i].r-1)*A[i].r/2;
	for(ll i=0;i<tot;i++) B[i]=A[tot-i-1];
	while(lim<=tot*2) lim<<=1;
	for(ll i=0;i<lim;i++)
		pos[i]=(pos[i>>1]>>1)|((i&1)*(lim>>1));
	fft(A,1);fft(B,1);
	for(ll i=0;i<lim;i++)
		A[i]=A[i]*B[i];
	fft(A,-1);
	printf("%lld ",SB);
	for(ll i=1;i<=n;i++){
		printf("%lld ",i<tot?(ll)(A[tot-1-i].r/(long double)lim+0.5):0);
	}
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define N 800005
#define ll long long
ll n,x,lim=1;
ll sum[N],pos[N];
ll a[N],b[N],tot;
ll SB=0;
struct node{
	double r,i;
}A[N],B[N],C[N];
const double pi=std::acos(-1);
node operator+(node a,node b){
	return (node){a.r+b.r,a.i+b.i};
}
node operator-(node a,node b){
	return (node){a.r-b.r,a.i-b.i};
}
node operator*(node a,node b){
	return (node){a.r*b.r-a.i*b.i,a.r*b.i+a.i*b.r};
}
void fft(node *a,ll f){
	for(ll i=0;i<lim;i++)
		if(i<pos[i]) std::swap(a[i],a[pos[i]]);
	for(ll len=2;len<=lim;len<<=1){
		ll mid=len>>1;
		node wn=(node){std::cos(2*pi/len),f*std::sin(2*pi/len)};
		for(ll l=0;l+len-1<lim;l+=len){
			node w=(node){1,0};
			for(ll k=0;k<mid;k++,w=w*wn){
				node x=a[l+k],y=a[l+k+mid]*w;
				a[l+k]=x+y;
				a[l+k+mid]=x-y;
			}
		}
	}
}
int main(){
	scanf("%lld%lld",&n,&x);
	for(ll i=0;i<n;i++){
		scanf("%lld",sum+i);
		if(sum[i]>=x) sum[i]=0;
		else sum[i]=1;
		if(sum[i]==1) a[tot++]=1;
		else a[tot]++;
		if(i)sum[i]+=sum[i-1];
	}
	a[tot++]++;
	for(ll i=0;i<tot;i++){
		SB+=(a[i]-1)*a[i]/2;
	}
	for(ll i=0;i<tot;i++) b[i]=a[tot-i-1];
	while(lim<=tot*2) lim<<=1;
	for(ll i=0;i<lim;i++)
		pos[i]=(pos[i>>1]>>1)|(i&1)*(lim>>1);
	for(ll i=0;i<lim;i++){
		A[i]=(node){a[i],0};
		B[i]=(node){b[i],0};
	}
	fft(A,1);fft(B,1);
	for(ll i=0;i<lim;i++)
		A[i]=A[i]*B[i];
	fft(A,-1);
	printf("%lld ",SB);
	for(ll i=1;i<=n;i++){
		printf("%lld ",i<tot?(int)(A[tot-1-i].r/lim+0.5):0);
	}
}


#include<cstdio>
#include<cmath>
#include<algorithm>
#define N 200005
int n,x,lim=1;
int sum[N],pos[N];
int a[N],b[N],tot;
int SB=0;
struct node{
	double r,i;
}A[N],B[N],C[N];
const double pi=std::acos(-1);
node operator+(node a,node b){
	return (node){a.r+b.r,a.i+b.i};
}
node operator-(node a,node b){
	return (node){a.r-b.r,a.i-b.i};
}
node operator*(node a,node b){
	return (node){a.r*b.r-a.i*b.i,a.r*b.i+a.i*b.r};
}
void fft(node *a,int f){
	for(int i=0;i<lim;i++)
		if(i<pos[i]) std::swap(a[i],a[pos[i]]);
	for(int len=2;len<=lim;len<<=1){
		int mid=len>>1;
			node wn=(node){std::cos(2*pi/len),f*std::sin(2*pi/len)};
		for(int l=0;l+len-1<lim;l+=len){
			node w=(node){1,0};
			for(int k=0;k<mid;k++,w=w*wn){
				node x=a[l+k],y=a[l+k+mid]*w;
				a[l+k]=x+y;
				a[l+k+mid]=x-y;
			}
		}
	}
}
int main(){
	scanf("%d%d",&n,&x);
	for(int i=0;i<n;i++){
		scanf("%d",sum+i);
		if(sum[i]>=x) sum[i]=0;
		else sum[i]=1;
		if(sum[i]==1) a[tot++]=1;
		else a[tot]++;
		if(i)sum[i]+=sum[i-1];
	}
	a[tot++]++;
	for(int i=0;i<tot;i++){
		SB+=(a[i]-1)*a[i]/2;
	}
//	for(int i=0;i<tot;i++){
//		printf("%d ",a[i]);
//	}
//	return 0;
	for(int i=0;i<tot;i++) b[i]=a[tot-i-1];
	while(lim<tot*2) lim<<=1;
	for(int i=0;i<lim;i++)
		pos[i]=(pos[i>>1]>>1)|(i&1)*(lim>>1);
	for(int i=0;i<lim;i++){
		A[i]=(node){a[i],0};
		B[i]=(node){b[i],0};
	}
	fft(A,1);fft(B,1);
	for(int i=0;i<lim;i++)
		A[i]=A[i]*B[i];
	fft(A,-1);
	printf("%d ",SB);
	for(int i=1;i<=n;i++){
		printf("%d ",i<tot?(int)(A[tot-1-i].r/lim+0.5):0);
	}
}


#include<cmath>
#include<cstdio>
#include<iostream>
#define maxn 1000000
#define ll long long
using namespace std;
const double Pi=acos(-1.0);
struct complex{
	double x,y;
	complex (double xx=0,double yy=0){x=xx,y=yy;}
}a[maxn],b[maxn],c[maxn];
int n,m,sum[200001],o[200001],k,lim,r[maxn],l;
ll ans;
complex operator + (complex a,complex b){return complex(a.x+b.x,a.y+b.y);}
complex operator - (complex a,complex b){return complex(a.x-b.x,a.y-b.y);}
complex operator * (complex a,complex b){return complex(a.x*b.x-a.y*b.y,a.x*b.y+a.y*b.x);}
void FFT(complex *a,int inv){
	for (int i=0; i<lim; i++)
		if (i<r[i]) swap(a[i],a[r[i]]);
	for (int i=1; i<lim; i<<=1){
		complex wn(cos(Pi/i),inv*sin(Pi/i));
		for (int j=0; j<lim; j+=(i<<1)){
			complex w(1,0);
			for (int k=0; k<i; k++,w=w*wn){
				complex x=a[j+k],y=w*a[j+i+k];
				a[j+k]=x+y; a[j+i+k]=x-y;
			}
		}
	}
}
int main(){
	int x;
	scanf("%d%d",&n,&m); o[0]=1;
	for (int i=1; i<=n; i++){
		scanf("%d",&x),x=(x<m);
		sum[i]=sum[i-1]+x; o[sum[i]]++;
	}
	for (int i=0; i<=n; i++) a[i].x=o[i],b[i].x=o[n-i];
	lim=1; while (lim<=2*n+2) lim<<=1,l++;
	for (int i=0; i<lim; i++)
		r[i]=(r[i>>1]>>1)|((i&1)<<(l-1));
	FFT(a,1); FFT(b,1);
	for (int i=0; i<=lim; i++) c[i]=a[i]*b[i];
	FFT(c,-1);
	for (int i=0; i<=n; i++) ans+=1LL*o[i]*(o[i]-1)/2;
	printf("%I64d ",ans);
	for (int i=n-1; i>=0; i--)
		printf("%I64d ",(ll)(c[i].x/lim+0.5));
	return 0;
}
/*luogu*/


#include <bits/stdc++.h>
using namespace std;
#define int long long
int read()
{
    int d = 0, w = 1;
    char ch = getchar();
    while (ch != '-' && (ch < '0' || ch > '9'))
        ch = getchar();
    if (ch == '-')
        w = -1, ch = getchar();
    while (ch >= '0' && ch <= '9')
        d = d * 10 + ch - '0', ch = getchar();
    return d * w;
}
void write_(int x)
{
    if (x < 0)
        x = -x, putchar('-');
    if (x > 9)
        write_(x / 10);
    putchar(x % 10 + '0');
}
void writeln(int x)
{
    write_(x);
    putchar('\n');
}
void writesp(int x)
{
    write_(x);
    putchar(' ');
}
int A[550000], B[550000];
int r[550000];
int a[550000];
const int P = 998244353;
const int G = 3;
const int Gi = 332748118;
int power(int a, int b)
{
    int ans = 1;
    for (; b; b >>= 1, a = (long long)a * a % P)
        if (b & 1)
            ans = (long long)ans * a % P;
    return ans;
}
void NTT(int *A, int n, int opt)
{
    for (int i = 0; i < n; ++i)
        if (i < r[i])
            swap(A[i], A[r[i]]);
    for (int i = 1; i < n; i <<= 1)
    {
        int buf = power(opt == 1 ? G : Gi, (P - 1) / (i << 1));
        for (int j = 0; j < n; j += i << 1)
        {
            int w = 1;
            for (int k = 0; k < i; ++k, w = (long long)w * buf % P)
            {
                int p = A[j + k], q = (long long)w * A[j + k + i] % P;
                A[j + k] = (p + q) % P;
                A[j + k + i] = (p - q + P) % P;
            }
        }
    }
    if (opt == -1)
    {
        int inv = power(n, P - 2);
        for (int i = 0; i < n; ++i)
            A[i] = (long long)A[i] * inv % P;
    }
}
signed main()
{
#ifdef __clang__
    freopen("data.in", "r", stdin);
    freopen("data.out", "w", stdout);
#endif
    int n = read(), x = read();
    A[0] = 1;
    for (int i = 1; i <= n; ++i)
        a[i] = (read() < x) + a[i - 1], ++A[a[i]];
    for (int i = 0; i <= n; ++i)
        B[n - i] = A[i];
    int m = n;
    int l = 0;
    for (m += n, n = 1; n <= m; n <<= 1)
        ++l;
    for (int i = 0; i < n; ++i)
        r[i] = (r[i >> 1] >> 1) | ((i & 1) << (l - 1));
    NTT(A, n, 1), NTT(B, n, 1);
    for (int i = 0; i < n; ++i)
        A[i] = (long long)A[i] * B[i] % P;
    NTT(A, n, -1);
    for(int i = 1; i <= m /2; ++i)
        B[i] = A[m/2 - i];
    B[0] = 0;
    for (int i = 1, z = 0; i <= m / 2; ++i)
    {
        if (a[i] != a[i - 1])
            z = i;
        (B[0] += i - z) %= P;
    }
    for (int i = 0; i <= m / 2; ++i)
        writesp(B[i]);
    return 0;
}