#include<bits/stdc++.h>
#include <algorithm>
#include <complex>

using namespace std;
typedef long long ll;
typedef complex<long double> point;
const ll N = 2e5+5,mod=1e9+7,inf=1e9+5;
long double pi=3.14159265359;
ll a[N],b[N],inv[N],fact[N];
int n,c;
ll fp(int base,int exp){
    if(exp==0)return 1;
    ll ans=fp(base,exp/2);
    ans=(ans*ans)%mod;
    if(exp%2)
        ans=(ans*base)%mod;
    return ans;
}
ll ncr(int n,int r){
return ((fact[n]*inv[n-r])%mod*inv[r])%mod;
}
int main()
{
    iostream::sync_with_stdio(false);
     cin.tie(0);
     cout.tie(0);
     int n,m,mm;
     inv[0]=fact[0]=1;
     for(int i=1;i<2e5;i++){
        fact[i]=(i*fact[i-1])%mod;
        inv[i]=fp(fact[i],mod-2);
     }

     cin>>n>>m;
     mm=m;
     ll ans=1;
     for(int i=2;i*i<=m;i++){
            int c=0;
        while(m%i==0){
            m/=i;
     c++;
        }

        ans*=ncr(n+c-1,c);
        ans%=mod;
     }
     if(m>1){
        ans*=n;

        ans%=mod;
     }
     cout<<ans;

    return 0;
}

#include <cstdio>
#include <iostream>

#define debug(...) fprintf(stderr, __VA_ARGS__)

#define inver(a) power(a, mod - 2)

using namespace std;

inline char nc()
{
	return getchar();
	static char buf[100000], *l = buf, *r = buf;
	return l==r&&(r=(l=buf)+fread(buf,1,100000,stdin),l==r)?EOF:*l++;
}
template<class T> void read(T &x)
{
	x=0; int f=1,ch=nc();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=nc();}
	while(ch>='0'&&ch<='9'){x=x*10-'0'+ch;ch=nc();}
	x*=f;
}

typedef long long ll;

const int mod = 998244353;
const int MAXK = 2000 + 5;
const int MAXN = 2000 + 5;
int K, N;

inline int add(int x) {return x >= mod ? x - mod : x;}
ll power(ll x, ll y)
{
	ll re = 1;
	while(y)
	{
		if(y & 1) re = re * x % mod;
		x = x * x % mod;
		y >>= 1;
	}
	return re;
}

const int maxn = MAXN + MAXK;
int fac[maxn];
int inv[maxn];
void init_binom(int n)
{
	fac[0] = 1;
	for(int i = 1; i <= n; ++i)
	{
		fac[i] = (ll)fac[i - 1] * i % mod;
	}
	inv[n] = inver(fac[n]);
	for(int i = n; i >= 1; --i)
	{
		inv[i - 1] = (ll)inv[i] * i % mod;
	}
}
int binom(int x, int y)
{
	if(x < y) return 0;
	return (ll)fac[x] * inv[y] % mod * inv[x - y] % mod;
}
int F(int x, int y)
{
	if(x == 0 && y == 0) return 1;
	return binom(x + y - 1, x);
}

int sol(int k, int n, int m)
{
	int an = 0;
	for(int j = 0, p = 1; j <= m && j <= n; ++j)
	{
		an = (an + (ll)binom(m, j) * F(n - j, k - 2 * m + j) % mod * p) % mod;
		p = add(p << 1);
	}
	return an;
}

int main()
{
	read(K), read(N);
	init_binom(K + N);
	for(int i = 2; i <= 2 * K; ++i)
	{
		int m = 0;
		for(int a = 1, b = i - 1; a < b; ++a, --b)
		{
			if(b <= K) ++m;
		}
		if(i & 1) printf("%d\n", sol(K, N, m));
		else printf("%d\n", add(sol(K - 1, N, m) + sol(K - 1, N - 1, m)));
	}
	return 0;
} 