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

int mod = 998244353;
long long dp[30][5005];

long long fac[5005],finv[5005],inv[5005];

void COMinit() {
    fac[0] = fac[1] = finv[0] = finv[1] = inv[1] = 1;
    for(int i = 2; i <= 5000; i++) {
        fac[i] = fac[i-1]*i%mod;
        inv[i] = mod-inv[mod%i]*(mod/i)%mod;
        finv[i] = finv[i-1]*inv[i]%mod;
    }
}

long long COM(int n,int k) {
    if(n < k) return 0;
    if(n < 0 || k < 0) return 0;
    return fac[n]*(finv[k]*finv[n-k]%mod)%mod;
}

int main() {
    int N,M;
    cin >> N >> M;
    dp[0][0] = 1;
    COMinit();
    for(int i = 0; i < 13; i++) {
        for(int j = 0; j <= N; j+=2) {
            for(int k = 0; k <= M; k++) {
                long long l = k+(j << i);
                if(l <= M) {
                    dp[i+1][l] += dp[i][k]*COM(N,j)%mod;
                    dp[i+1][l] %= mod;
                }
            }
        }
    }
    cout << dp[13][M] << endl;
}

#include<cstdio>
#define fo(i,a,b) for(i=a;i<=b;i++)
#define fd(i,a,b) for(i=a;i>=b;i--)
#define ll long long
#define I int
#define R read()
#define V void
using namespace std;
const I N=5005,mo=998244353;
I i,j,k,n,m,mc,num;
I dl[13];
ll f[14][N];
I jc[13];
I jc2[N],ny[N];
ll ch;
I R
{
	I x=0,ef=1;char s=getchar();
	while ((s<'0')||(s>'9')){if (s=='-')ef=-1;s=getchar();}
	while ((s>='0')&&(s<='9')) x=(x<<1)+(x<<3)+(s-'0'),s=getchar();
	return x*ef;
}
I ksm(I x,I y)
{
	ll l=x,r=1;I z=y;
	while (z)
	{
		if (z%2==1)r=r*l%mo;
		l=l*l%mo;z=z/2;
	}
	return r;
}
I C(I x,I y)
{
	ch=jc2[x];ch=ch*ny[y]%mo*ny[x-y]%mo;return ch;
}
I main()
{
	n=R;m=R;mc=m;
	while (mc){num++;dl[num]=mc%2;mc/=2;}
	jc[0]=1;fo(i,1,12){jc[i]=jc[i-1]*2;}
	ch=1;jc2[0]=1;ny[0]=1;fo(i,1,n){ch=ch*i%mo;jc2[i]=ch;}
	ch=ksm(ch,mo-2);ny[n]=ch;
	fd(i,n-1,1){ch=ch*(i+1)%mo;ny[i]=ch;}
	f[0][m]=1;
	fo(i,0,num-1)
	{
		fd(j,m,0)
		{
			if (f[i][j])
			{
			fo(k,0,n/2)
			{
				if (j/jc[i]<k*2)break;
				f[i+1][j-jc[i]*k*2]=(f[i+1][j-jc[i]*k*2]+f[i][j]*C(n,k*2))%mo;
			}
			}
		}
	}
	printf("%d\n",f[num][0]);
	fclose(stdin);
	fclose(stdout);
	return 0;
}