#include <bits/stdc++.h>
#define fo(a,b,c) for (a=b; a<=c; a++)
#define fd(a,b,c) for (a=b; a>=c; a--)
#define fu(x) (((x)&1)?-1:1)
#define add(a,b) a=((a)+(b))%mod
#define min(a,b) (a<b?a:b)
#define max(a,b) (a>b?a:b)
#define mod 998244353
#define Mod 998244351
#define ll long long
//#define file
using namespace std;

int n,K,i,j,k,l,ii;
int a[51];
ll C[2001][2001],jc[2001],Jc[2001];
ll f[51][2001][51];
ll ans,p0,p1,Len,LEN,L;

ll qpower(ll a,int b) {ll ans=1; while (b) {if (b&1) ans=ans*a%mod;a=a*a%mod;b>>=1;} return ans;}
ll E(ll p,ll a,ll b) {return p*qpower(qpower(1-b,a+1),Mod)%mod;} //p*x^a*e^b

int main()
{
	#ifdef file
	freopen("CF1477F.in","r",stdin);
	#endif
	
	scanf("%d%d",&n,&K);
	fo(i,1,n) scanf("%d",&a[i]),Len+=a[i];LEN=qpower(Len,Mod);
	
	C[0][0]=1;
	fo(i,1,2000)
	{
		C[i][0]=C[i][i]=1;
		fo(j,1,i-1) C[i][j]=(C[i-1][j-1]+C[i-1][j])%mod;
	}
	jc[0]=1;
	fo(i,1,2000) jc[i]=jc[i-1]*i%mod;
	Jc[2000]=qpower(jc[2000],Mod);
	fd(i,2000-1,0) Jc[i]=Jc[i+1]*(i+1)%mod;
	
	f[0][0][0]=1;
	fo(l,1,n)
	{
		L=a[l],ii=(L-1)/K;
		fo(i,0,ii)
		{
			p0=qpower((L-i*K)*LEN%mod,i)*fu(i)*Jc[i]%mod;
			if (i)
			p1=qpower((L-i*K)*LEN%mod,i-1)*fu(i)*Jc[i-1]%mod;
			fo(j,0,Len)
			{
				fo(k,0,l-1)
				if (f[l-1][j][k])
				{
					add(f[l][j+i][k],f[l-1][j][k]*p0);
					if (i)
					add(f[l][j+i][k+1],f[l-1][j][k]*p1);
				}
			}
		}
	}
	fo(j,0,Len) fo(k,0,n) f[n][j][k]=-f[n][j][k];
	add(f[n][0][0],1);
	assert(!f[n][0][0]);
	
	fo(j,0,Len) fo(k,0,n) if (f[n][j][k])
	add(ans,E(f[n][j][k],j-k,(Len-j*K)*LEN%mod)*jc[j-k]);
	printf("%lld\n",(ans+mod)%mod);
	
	fclose(stdin);
	fclose(stdout);
	return 0;
}