#include<bits/stdc++.h>
using namespace std;

#define int long long 
#define rep(i,n) for(int i=0;i<n;i++)

struct Conbinatorics
{
    int _max_N;
    const int _mod;
    const bool _pre_caluculation;
    int *_F, *_R;
    Conbinatorics(int n, int mod=1000000007, bool pre_calculation=true)
        : _max_N(2 * n)
        , _mod(mod)
        , _pre_caluculation(pre_calculation)
        {
            _F = new int[_max_N + 1];
            _F[0] = 1;
            for(int i = 1; i <= _max_N; i++)_F[i] = _F[i - 1] * i % mod;

            if(pre_calculation)
            {
                _R = new int[_max_N + 1];
                for(int i = 0; i <= _max_N; i++)_R[i] = inv(_F[i]);
            }
        }

    ~Conbinatorics()
    {
        delete[] _F;
        if(_pre_caluculation) delete[] _R;
    }

    int pow_mod(int a, int b)
    {
        if(b == 0)return 1;
        int ret = pow_mod(a * a % _mod, b / 2);
        if(b % 2 == 1)ret = ret * a % _mod;
        return ret;
    }

    int inv(int x) { return pow_mod(x, _mod - 2); }

    int P(int a, int b)
    {
        if(a < b)return 0;
        if(b < 0)return 0;
        if(_pre_caluculation) return _F[a] * _R[a - b] % _mod;
        else return _F[a] * inv(_F[a - b]) % _mod;
    }

    int C(int a, int b)
    {
        if(a < b)return 0;
        if(b < 0)return 0;
        if(_pre_caluculation) return P(a, b) * _R[b] % _mod;
        else return P(a, b) * inv(_F[b]) % _mod;
    }

    int H(int a, int b){ return C(b + a - 1, a - 1); }
};

int N, K;
int A[200010];
const int mod = 998244353;
int mem[310];
int P[200010];
Conbinatorics con(1010, mod);

signed main()
{
    cin >> N >> K;

    rep(i, N)cin >> A[i];

    rep(i, N)P[i] = 1;
    rep(i, K + 1)
    {
        rep(j, N)
        {
            mem[i] = (mem[i] + P[j]) % mod;
            P[j] = P[j] * A[j] % mod;
        }
    }

    rep(i, N)P[i] = 1;

    for(int i = 1; i <= K; i++)
    {
        int ans = 0;
        rep(j, N)P[j] = P[j] * 2 * A[j] % mod;

        rep(j, i + 1)
        {
            ans = (ans + con.C(i, j) * mem[j] % mod * mem[i - j]) % mod;
        }

        rep(j, N)ans = (ans - P[j] + mod) % mod;

        ans = ans * con.pow_mod(2, mod - 2) % mod;

        cout << ans << endl;
    }

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back               
#define mp make_pair         
#define nline "\n"
const ll M1=1e9+7;                                               
const ll M2=998244353;                           
const ll N=1000005; 
const ll INF_MUL=1e13;                                                      
const ll INF_ADD=1e18;   
#define f first                             
#define s second                                
#define pll pair<ll,ll>       
#ifndef ONLINE_JUDGE    
#define debug(x) cerr<<#x<<" "; _print(x); cerr<<nline;
#else
#define debug(x);  
#endif     
void _print(ll x){cerr<<x;}    
template<class T,class V> void _print(pair<T,V> p) {cerr<<"{"; _print(p.first);cerr<<","; _print(p.second);cerr<<"}";}
template<class T>void _print(vector<T> v) {cerr<<" [ "; for (T i:v){_print(i);cerr<<" ";}cerr<<"]";}
template<class T>void _print(set<T> v) {cerr<<" [ "; for (T i:v){_print(i); cerr<<" ";}cerr<<"]";}
template<class T>void _print(multiset<T> v) {cerr<< " [ "; for (T i:v){_print(i);cerr<<" ";}cerr<<"]";}
template<class T,class V>void _print(map<T, V> v) {cerr<<" [ "; for(auto i:v) {_print(i);cerr<<" ";} cerr<<"]";} 
//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

void solve(){
    ll l,r,final=0; cin>>l>>r;  
    vector<ll> ans(r+5,0),bad(r+5,0);           
    for(ll i=r-1;i>=2;i--){   
        ans[i]=r/i-(l-1)/i-(i>=l);
        bad[i]=r/i-(l-1)/i;
        bad[i]=bad[i]*(bad[i]-1);   
        ans[i]=ans[i]*(ans[i]-1);   
        for(ll j=i+i;j<=r;j+=i){   
            ans[i]-=bad[j];
            bad[i]-=bad[j];
        }   
        final+=ans[i];
    }    
    cout<<final;
    return;
}                  
int main()                                                     
{                  
    ios_base::sync_with_stdio(false);                        
    cin.tie(NULL);                       
    #ifndef ONLINE_JUDGE            
    freopen("input.txt", "r", stdin);                                           
    freopen("output.txt", "w", stdout);  
    freopen("error.txt", "w", stderr);                        
    #endif    
    ll test_cases=1;              
    //cin>>test_cases;
    while(test_cases--){  
        solve();   
    }
    /*
    Correct data type?
    Infinity?
    Base case?
    */
    cerr<<"Time:"<<1000*((double)clock())/(double)CLOCKS_PER_SEC<<"ms\n"; 
} 