#include <bits/stdc++.h>
#define union Union
#define rank rank228
#define tm tm228
#define hash hash228
#define matr vector < vector < int > >
#define int long long 
#define pii pair < int, int >
#define papa pair < node*, node* >
#define all(v) v.begin(), v.end()
//#define endl "\n"
#define pb push_back
#define PI 3.14159265358979323846
#define ff first
#define ss second
using namespace std;

const int maxn = 1e6 + 100, mod = 998244353, inf = 1e9;

int mood(int x)
{
    x %= mod;
    if (x < 0)
        x += mod;
    return x;
}

int faq[maxn], rfaq[maxn], p[maxn];

int binpow(int a, int b)
{
    if (b == 0)
        return 1;
    int t = binpow(a, b / 2);
    t *= t;
    t = mood(t);
    if (b % 2)
        t *= a;
    t = mood(t);
    return t;
}

int c(int n, int m)
{
    int ans = 1;
    if (n >= m)
        return 1;
    ans *= faq[m];
    ans = mood(ans);
    ans *= rfaq[n];
    ans = mood(ans);
    ans *= rfaq[m - n];
    ans = mood(ans);
    return ans;
}

void solve()
{
    faq[0] = 1;
    for (int i = 1; i < maxn; ++i)
    {
        faq[i] = mood(faq[i - 1] * i);
        rfaq[i] = binpow(faq[i], mod - 2);
    }
    int n, m, ans = 0;
    cin >> n >> m;
    for (int i = 0; i < maxn; ++i)
        p[i] = -1;
    for (int i = 2; i < maxn; ++i)
    {
        if (p[i] == -1)
        {
            for (int j = i * i; j < maxn; j += i)
                p[j] = i;
            p[i] = i;
        }
    }
    for (int i = 1; i <= m; ++i)
    {
        int x = i, k = 1;
        map < int, int > mp;
        while (x > 1)
        {
            mp[p[x]]++;
            x /= p[x];
        }
        for (auto [x, y] : mp)
        {
            k *= c(y, n + y - 1);
            k = mood(k);
        }
        ans += k;
        ans = mood(ans);
    }
    cout << ans << endl;
}    

signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);
    srand(10);
    cout << fixed << setprecision(20);
    int t = 1;
    //cin >> t;
    while (t--)
    {
        solve();
        cout << endl;
    }
}
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end()
#define rall(c) (c).rbegin(),(c).rend()
#define mp make_pair
#define endl '\n'
#define vec vector<ll>
#define mat vector<vector<ll> >
#define fi first
#define se second
typedef long long ll;
typedef unsigned long long ull;
typedef pair<ll,ll> pll;
typedef long double ld;
typedef complex<double> comp;
const ll INF=1e9+7;
const ll inf=INF*INF;
const ll MOD=998244353;
const ll mod=MOD;
const int MAX=200010;


ll rui(ll a,ll b){
    ll res=1;
    ll x=a;
    while(b){
        if(b&1)res=res*x%mod;
        x=x*x%mod;
        b/=2;
    }
    return res;
}

signed main(){
    ll n,k;cin>>n>>k;
    vector<ll>a(n);
    rep(i,n)cin>>a[i];
    vector<ll>fac(k+1);
    fac[0]=1;
    REP(i,1,k+1){
        fac[i]=fac[i-1]*i%mod;
    }
    vector<ll>inv(k+1);
    rep(i,k+1){
        inv[i]=rui(i,mod-2);
    }
    vector<vector<ll> >b(n,vector<ll>(k+1));
    vector<ll>sum(k+1);
    rep(i,n){
        ll ai=a[i];
        rep(j,k+1){
            if(j==0){
                b[i][j]=1;
            }else{
                b[i][j]=b[i][j-1]*ai%mod*inv[j]%mod;
            }
            sum[j]=(sum[j]+b[i][j])%mod;
        }
    }
    vector<vector<ll> >mn(n,vector<ll>(k+1));
    vector<ll>sum2(k+1);
    rep(i,n){
        ll ai=a[i];
        rep(j,k+1){
            if(j==0){
                mn[i][j]=1;
            }else{
                mn[i][j]=mn[i][j-1]*ai%mod*2LL%mod;
            }
            sum2[j]=(sum2[j]+mn[i][j])%mod;
        }
    }
    ll inv2=rui(2LL,mod-2);
    REP(i,1,k+1){
        ll ans=0;
        rep(j,i+1){
            ans=(ans+sum[j]*sum[i-j]%mod)%mod;
        }
        ans=ans*fac[i]%mod;
        ans=(ans-sum2[i])%mod;
        ans=ans*inv2%mod;
        if(ans<0)ans+=mod;
        cout<<ans<<endl;
    }
}