#include<iostream>
#include<algorithm>
#include<cstring>
#define debug(a) cout<<#a<<" = "<<a<<endl

using namespace std;

typedef long long ll;
const int N = 5010;
const int MOD = 998244353;

int n , m;
ll C[N];
ll f[N];

ll Q_power(ll a ,ll b){
    ll res = 1;
    while(b){
        if(b & 1) res = res * a % MOD;
        b >>= 1;
        a = a*a % MOD;
    }
    return res;
}

ll X_1(ll a){ return Q_power(a ,MOD - 2) ;}

void init(){
    C[0] = 1;
    for(int i = 1 ; i <= n ; i ++){
        C[i] = C[i - 1] * (n - i + 1) % MOD * X_1(i) % MOD;
    }
}

ll F(int m){
    if(~f[m] == 0){
        f[m] = 0;
        if(!(m & 1)){
            for(int i = 0 ; i * 2 <= m ; i ++){
                f[m] = (f[m] + C[i * 2] * F(m / 2 - i) % MOD) % MOD; 
            }
        }
    }
    return f[m];
}

int main(){
    cin >> n >> m;
    memset(f,0xff,sizeof f);
    init(); f[0] = 1;
    cout << F(m) << endl;
    return 0;
}

#include<cstdio>
#include<algorithm>
#include<cstring>

#define ll long long
#define fo(i,x,y) for(ll i=x;i<=y;i++)
#define fd(i,x,y) for(ll i=x;i>=y;i--)

using namespace std;
const int N=5010,M=5010;
const int E=17;

const ll mod=998244353;

ll n,m,i,j,k,tot,ans,s,t,x,y,z;

ll f[E][M];
ll e[E];

ll jie[M],ny[M];

void read(ll &a) {
	a=0; char c=getchar();
	while (c<'0'||c>'9') c=getchar();
	while (c>='0'&&c<='9') {a=a*10-48+c; c=getchar();}
	return;
}

ll ksm(ll i,ll j) {
	ll re=1;
	while (j>0) {
		if (j&1) re=re*i%mod;
		j/=2; i=i*i%mod;
	}
	return re;
}

void ycl() {
	jie[0]=1;
	fo(i,1,M-1) jie[i]=jie[i-1]*i%mod;
	ny[M-1]=ksm(jie[M-1],mod-2);
	
	fd(i,M-2,0) ny[i]=ny[i+1]*(i+1)%mod;
}

ll C(ll x,ll y) {return jie[x]*ny[y]%mod*ny[x-y]%mod;}

int main() {
	ycl();
	
	read(n); read(m);
	
	e[1]=1;
	fo(i,2,E-1) e[i]=e[i-1]*2;
	f[0][0]=1;
	
	fo(i,1,E-1) {
		if (e[i]>m) {t=i-1; break;}
		for (j=0;j<=m/e[i]&&j<=n;j+=2) {
			fo(k,0,m-e[i]*j) f[i][k+e[i]*j]=(f[i][k+e[i]*j]+f[i-1][k]*C(n,j))%mod;
		}
	}
	
	ans=f[t][m];
	printf("%lld\n",ans);
}