/*
Another source code by:

  _   _ _ _   _        _____       _   
 | \ | (_) | (_)      / ____|     | |  
 |  \| |_| |_ _ _ __ | |  __ _ __ | |_ 
 | . ` | | __| | '_ \| | |_ | '_ \| __|
 | |\  | | |_| | | | | |__| | |_) | |_ 
 |_| \_|_|\__|_|_| |_|\_____| .__/ \__|
                            | |        
                            |_|        
*/                            
#include<bits/stdc++.h>
#include <vector>
using namespace std;
#define vi vector<int>
#define pb push_back
#define p push
#define sll stack<long long>
#define qll queue<long long>
#define vll vector<long long>
#define st string
#define vvll vector<vll>
#define vstr vector <string>
#define vp vector <pair<ll,ll>>
#define fori(n) for(ll i=0;i<n;i++)
#define forj(n) for(int j=0;j<n;j++)
#define fork(n) for(int k=0;k<n;k++)
#define fori1(n) for(int i=1;i<n;i++)
#define f(i,a,b) for(int i=a;i<=b;i++)
#define s(v) sort(v.begin(),v.end())
#define sr(v) sort(v.rbegin(),v.rend())
#define ll long long
#define MOD 1000000007
#define pi 3.14159265358979323
#include <math.h>
#define yn(n) if(n)cout<<"yes\n";else cout<<"no\n";
#define Yn(n) if(n)cout<<"Yes\n";else cout<<"No\n";
#define YN(n) if(n)cout<<"YES\n";else cout<<"NO\n";
#define mp   make_pair 
#define ff first
#define ss second


ll gcd(ll a, ll b){if(b==0)return a;return gcd(b, a%b);}
ll lcm(ll a, ll b){return a*b/gcd(a, b);}
ll modify(ll n){ll res = n;res%=MOD;res+=MOD;res%=MOD;return res;}
ll md(ll n){if(n>0)return n;else return -n;}
ll mv(vll v){ll m=v[0];fori(v.size()){m=max(v[i],m);}return m;}
vll read(ll n){vll v(n);fori(n)cin>>v[i];return v;}
void out(vll v){fori(v.size()){cout<<v[i]<<" ";}cout<<"\n";}

void solve(){
    ll n,m,k,x;
    vector<pair<pair<int,int>,int>> v1,v2;
    cin>>n;
    fori(n){
        cin>>m>>k;
        v1.pb({{m,k},i});
        v2.pb({{k,m},i});
    }
    s(v1);
    s(v2);
    // fori(n){
    //     cout<<v1[i].first.first<<" "<<v1[i].first.second<<"\n";
    // }
    // cout<<"\n";
    // fori(n){
    //     cout<<v2[i].first.first<<" "<<v2[i].first.second<<"\n";
    // }
    // cout<<"\n";
    vll visited(n,0);
    vp temp;
    fori(n){
        if(i==0||i==1||i==n-2||i==n-1){
            if(visited[v1[i].second]==0){
                temp.pb(v1[i].first);
                visited[v1[i].second]=1;
            }
        }
    }
    fori(n){
        if(i==0||i==1||i==n-2||i==n-1){
            if(visited[v2[i].second]==0){
                temp.pb({v2[i].first.second,v2[i].first.first});
                visited[v2[i].second]=1;
            }
        }
    }
    vll ans;
    fori(temp.size()){
        for(int j=i+1;j<temp.size();j++){
            ans.pb(max(abs(temp[i].first-temp[j].first),abs(temp[i].second-temp[j].second)));
        }
    }
    sr(ans);
    
    cout<<ans[1];
}
int main(){
    
#ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif 
        
    int t;
    t=1;
    //cin >> t;
    while(t--){
        solve();
        
    }

    
    cerr << "Time : " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC << "ms\n";

}


#include <bits/stdc++.h>
namespace IO{
    char buf[1000000],*p1,*p2;
    inline char getc(){
        if(p1==p2) p2=(p1=buf)+fread(buf,1,10,stdin);
        return p1==p2?EOF:*(p1++);
    }
    template<typename tp>inline void r(tp &n){
        n=0;char c=getc();
        while(!isdigit(c)) c=getc();
        while( isdigit(c)) n=n*10+c-48,c=getc();
    }
    template<typename tp>inline void w(tp  n){
        if(n/10) w(n/10);
        putchar(n%10+48);
    }
};
using namespace IO;
const int N=2e5+5,K=3e2+5,Mod=998244353;
using namespace std;
int n,k;
int a[N],bin[K],s[N][K],c[K][K];
void Prework(){
    bin[0]=1;
    for(int i=1;i<=k;++i)
        bin[i]=bin[i-1]*2ll%Mod;
    c[0][0]=c[1][0]=1;
    for(int i=1;i<=k;++i,c[i][0]=1)
    for(int j=1;j<=i;++j)  
        c[i][j]=(c[i-1][j-1]+c[i-1][j])%Mod;
    for(int i=1;i<=n;++i) s[i][0]=1;
    for(int i=1;i<=n;++i)
    for(int j=1;j<=k;++j)
        s[i][j]=1ll*s[i][j-1]*a[i]%Mod;
    for(int i=0;i<=k;++i)
    for(int j=2;j<=n;++j)
        s[j][i]=(s[j-1][i]+s[j][i])%Mod;
}
int solve(int d){
    int res=0;
    for(int i=0;i<=d;++i)
        res=(res+1ll*c[d][i]*s[n][i]%Mod*s[n][d-i]%Mod)%Mod;
    return res;
}
int Q(long long b,int t){
    long long ret=1;
    for(int i=1;i<=t;i<<=1,b=b*b%Mod)
        if(i&t) ret=ret*b%Mod;
    return ret;
}
int main(){
  
    r(n),r(k);
    for(int i=1;i<=n;++i)
        r(a[i]);
    Prework();
    int inv=Q(2,Mod-2);
    for(int i=1;i<=k;++i){
        int ans=solve(i);
        ans=(ans-1ll*bin[i]*s[n][i]%Mod+Mod)%Mod;
        w(1ll*ans*inv%Mod);putchar(10);
    }
    return 0;
}