#include<iostream>
#include<cstring>
#include<algorithm>
using namespace std;
const int N = 5005, mod = 998244353;
typedef long long ll;
ll a[N], fac[N], infac[N];
ll f[N][N][2];//从前i项中选j项增加d结果不变的方案数
ll qmi(ll a, int k, int p)//return qmi(a,mod-2,mod)即a的逆元
{
ll res = 1;
while (k)
{
if (k & 1)
res = (ll)res * a % p;
k >>= 1;
a = (ll)a * a % p;
}
return res;
}
int main()
{
int n, d;
cin >> n >> d;
for (int i = 1; i <= n; i++)
cin >> a[i];
fac[0] = 1;
for (int i = 1; i <= n; i++)
{
fac[i] = fac[i - 1] * i % mod;
infac[i] = qmi(fac[i], mod - 2, mod);
}
sort(a + 1, a + 1 + n);
f[0][0][0] = 1;
for (int i = 1; i <= n; i++)
{
for (int j = 0; j <= i; j++)
{
//第i项不选
f[i][j][0] = (f[i - 1][j][0] +
f[i - 1][j][1] * (a[i - 1] + d <= a[i])) % mod;//判断第i-1项增加d后是否对结果有影响
if (j)//第i项选
f[i][j][1] = (f[i - 1][j - 1][1] +
f[i - 1][j - 1][0]) % mod;
}
}
for (int k = 1; k <= n; k++)
cout << (f[n][k][1] + f[n][k][0]) *
fac[k] % mod * fac[n - k] % mod * infac[n] % mod << endl;
/*for (int i = 1; i <= n; i++)
{
for (int j = 1; j <= n; j++)
cout << f[i][j][0] << ' ' << f[i][j][1] << endl;
cout << endl;
}*/
return 0;
}