#include<bits/stdc++.h>
#define cs const
#define pb push_back
using namespace std;
cs int Mod = 998244353;
int add(int a, int b){ return a + b >= Mod ? a + b - Mod : a + b; }
int dec(int a, int b){ return a - b < 0 ? a - b + Mod : a - b; }
int mul(int a, int b){ return 1ll * a * b % Mod; }
void Add(int &a, int b){ a = add(a, b); }
void Dec(int &a, int b){ a = dec(a, b); }
void Mul(int &a, int b){ a = mul(a, b); }
int ksm(int a, int b){
	int ans = 1; for(; b; b >>= 1, Mul(a, a))
	if(b & 1) Mul(ans, a); return ans; 
}
cs int N = 55, M = 2e3 + 50; 
int n, K, L, l[N];
int fc[M], ifc[M], dp[2][N][M];
void fc_init(int n){
	fc[0] = ifc[0] = 1; 
	for(int i = 1; i <= n; i++) 	
		fc[i] = mul(fc[i - 1], i);
	ifc[n] = ksm(fc[n], Mod - 2);
	for(int i = n - 1; i; i--)
		ifc[i] = mul(ifc[i + 1], i + 1);
}
int main(){
	#ifdef FSYo
	freopen("1.in", "r", stdin);
	#endif
	cin >> n >> K;
	for(int i = 1; i <= n; i++)	
		scanf("%d", &l[i]), L += l[i];
	fc_init(L);
	int sm = 0, iL = ksm(L, Mod - 2);
	int now = 0, nxt = 1; 
	dp[0][0][0] = 1; 
	for(int i = 1; i <= n; i++){
		memcpy(dp[nxt], dp[now], sizeof(dp[nxt]));
		for(int k = 1; k * K < l[i]; k++){
			int c = mul(l[i] - k * K, iL);
			int a = mul(ifc[k], ksm(c, k));
			int b = mul(ifc[k - 1], ksm(c, k - 1));
			if(k & 1) a = dec(0, a), b = dec(0, b);
			for(int p = 0; p < i; p++)
			for(int q = 0, w; q <= sm; q++)
			if(w = dp[now][p][q])
			Add(dp[nxt][p][q + k], mul(a, w)), 
			Add(dp[nxt][p + 1][q + k], mul(b, w));
		} swap(now, nxt);
		sm += (l[i] - 1) / K;
	} 
	int ans = 0; 
	for(int i = 0; i <= n; i++)
	for(int j = 1, c; j <= sm; j++)
	if(c = dp[now][i][j]){
		int p = j - i; 
		int co = ksm(mul(j * K, iL), Mod - 2 - p);
		Mul(co, fc[p]); Add(ans, mul(c, co));
	} cout << dec(0, ans); return 0; 
}