#include using namespace std; #include using namespace atcoder; using mint=atcoder::modint998244353; mint inv[50009]; int main(){ int n,m;cin>>n>>m; vector d(n);for(auto&&e:d)cin>>e; for(int i=1;i<=m;i++)inv[i]=mint(i).inv(); const int B=150; vector cnt; vector> cnt1(B+1,vector(m+1)); vector> cnt2(B+1,vector(m+1)); for(int i=0;i<2;i++){ cnt.assign(B+1,0); for(auto&&e:d){ if(e>B||!i){ for(int j=1;j<=B;j++){ cnt1[j][e]+=cnt[j]; } } if(e<=B){ cnt[e]++; } } reverse(d.begin(),d.end()); swap(cnt1,cnt2); } mint ans=0; fenwick_tree ft(m+1); for(auto&&e:d){ if(e<=B)continue; for(int i=e;i<=m;i+=e){ ans+=ft.sum(i+1,m+1)*inv[m/e]; ft.add(i,inv[m/e]); } } for(int i=1;i<=B;i++){ for(int j=1;j<=m;j++){ if(cnt1[i][j].val()){ ans+=inv[m/i]*inv[m/j]*cnt1[i][j]*floor_sum(m/i,j,i,i-1); } if(cnt2[i][j].val()){ ans+=inv[m/i]*inv[m/j]*cnt2[i][j]*floor_sum(m/j,i,j,j-1); } } } for(auto&&e:d)ans*=m/e; cout<