#include <bits/stdc++.h>

using namespace std;

#define flush cout.flush

using ll = int;
using ull = unsigned long long;
using ld = long double;
using pl = pair<ll, ll>;
const ll INF = 1e9 + 7;
const ll mod = 1e9 + 7;
const ll mod2 = 998244353;
const ld eps = 1e-9;
const ld PI = acos(-1);

const ll LOG = 13;

ll bit[LOG];

int main() {
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    for (ll i = 0; i < LOG; ++i) {
        bit[i] = (1 << i);
    }
    ll n, m;
    cin >> n >> m;
    vector<ll> good(m + 1, 0);
    vector<ll> bad(m + 1, 0);
    good[0] = 1;
    for (ll p = 0; p < LOG; ++p) {
        bad.clear();
        bad.assign(m + 1, 0);
        for (ll i = 0; i < n; ++i) {
            vector<ll> new_good(m + 1, 0);
            vector<ll> new_bad(m + 1, 0);
            for (ll j = 0; j <= m; ++j) {
                new_good[j] = good[j];
                new_bad[j] = bad[j];
                if (j - bit[p] >= 0) {
                    new_good[j] += bad[j - bit[p]];
                    new_bad[j] += good[j - bit[p]];
                }
                new_good[j] %= mod2;
                new_bad[j] %= mod2;
            }
            good = new_good;
            bad = new_bad;
        }
    }
    cout << good[m] << "\n";
    return 0;
}
#pragma GCC optimize ("Ofast")
#include<bits/stdc++.h>
#define int long long
using namespace std;
inline int read()
{
	bool flag=1;
	int x=0;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')
			flag=0;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=(x<<1)+(x<<3)+c-'0';
		c=getchar();
	}
	return (flag?x:~(x-1));
}
int n,m,c[5001][5001],f[5001];
const int mod=998244353;
signed main()
{
	n=read();
	m=read();
	for(int i=0;i<=n;i++)
	{
		c[i][0]=1;
		for(int l=1;l<=i;l++)
			c[i][l]=(c[i-1][l-1]+c[i-1][l])%mod;
	}
	f[0]=1;
	for(int i=0;i<=11;i++)
	{
		int t=(1<<i)<<1;
		for(int l=m;l>=t;l--)
			for(int j=t,k=2;j<=l;j+=t,k+=2)
				(f[l]+=f[l-j]*c[n][k]%mod)%=mod;
	}
	cout<<f[m];
	return 0;
}
