#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define ll long long 
#define FI first 
#define SE second
#define pb push_back 
#define eb emplace_back
#define mod 998244353
#define all(c) (c).begin(),(c).end()
#define LB  lower_bound
#define UB  upper_bound
#define max3(a,b,c) max(c,max(a,b))
#define min3(a,b,c) min(c,min(a,b))
#define mems(s, n) memset(s, n, sizeof(s))
#define NINF -1e18
#define INF 1e18
#define int ll int
#define endl '\n'
#define double long double
#define OOK order_of_key  //no of elements less than
#define FBO find_by_order //iterator pointing kth element;indexing starts from 0
#define CK3(x,y,z) cout<<(x)<<" "<<(y)<<" "<<(z)<<endl
#define CK4(a,b,c,d) cout<<(a)<<" "<<(b)<<" "<<(c)<<" "<<(d)<<endl

typedef pair<int,int> PII;
typedef pair<pair<int,int>,int> PPII;
typedef pair<int,pair<int,int>> PIPI;
typedef map<int,int>MII;
typedef vector<int> VI;
template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

int power(int a, int b)
{int x=1,y=a;while(b>0){if(b%2){x =(x*y)%mod;}y =(y*y)%mod;b/=2;}return x%mod;}

int fact[100005],fact_inv[100005];
int ncr(int n,int r){
    if(n<r){return 0;}
    if(n==r||r==0){return 1;}
    return (((fact[n]*fact_inv[n-r])%mod)*fact_inv[r])%mod;
    //return x; 
}
int n;
int dp[5005][15],vis[5005][12];
int solve(int m,int i)
{
    if(vis[m][i]==true)
    return dp[m][i];
    vis[m][i]=true;
    if(i==0)
    {
        if(n>=m&&m%2==0)
        {
           dp[m][i]=ncr(n,m);
           
        }
        else dp[m][i]=0;
        return dp[m][i];
    }
    
    int ans=0;
    for(int j=0;j<=n;j+=2)
    {
        int x=m-j*(1ll<<i);
        if(x>=0)
        {
            ans+=(solve(x,i-1)*ncr(n,j))%mod;
            ans%=mod;
        }
    }
    dp[m][i]=ans;
    return dp[m][i];
}

signed main()
{
ios::sync_with_stdio(false); cin.tie(0);
int T=1,T1=0;//cin>>T;
fact[0]=1;
    for(int i=1;i<100005;i++){
        fact[i]=(fact[i-1]*i)%mod;
        fact_inv[i]=power(fact[i],mod-2);
    }


while(T1++<T)
{//cout<<"Case #"<<T1<<": ";
    int m;
    cin>>n>>m;
    int ans=solve(m,12);
    cout<<ans<<endl;
}


return 0;
}




#include<iostream>
using namespace std;
typedef long long int ll;
const int mod = 998244353;
int n;
ll fact[5001],inv[5001];
ll dp[5001][51];
ll po(ll a, int p){
	if(p==0) return 1ll;
	ll ret=po(a,p/2);
	ret=ret*ret%mod;
	if(p%2) ret=ret*a%mod;
	return ret;
}
ll ncr(int n, int r){
	return (fact[n]*inv[n-r]%mod)*inv[r]%mod;
}
ll solve(int m, int j){
	if(m==0) return 1ll;
	if((1<<j)>m) return 0;
	if(dp[m][j]!=-1) return dp[m][j];
	ll ans=0;
	for(int i=0;i<=n and i*(1<<j)<=m;i+=2) ans=(ans+ncr(n,i)*solve(m-i*(1<<j),j+1)%mod)%mod;
	return dp[m][j]=ans;
}
int main(){
	int m;
	cin>>n>>m;
	fact[0]=1ll;
	inv[0]=1ll;
	for(ll i=1;i<=5000;i++){
		fact[i]=fact[i-1]*i%mod;
		inv[i]=po(fact[i],mod-2);
	}
	for(int i=0;i<5001;i++) for(int j=0;j<51;j++) dp[i][j]=-1;
	cout<<solve(m,0)<<"\n";
}
