#include <iostream>
#include <vector>
using namespace std;

int main()
{
    int N, M;
    cin>>N>>M;

    long long MOD = 998244353;
    vector<vector<long long>> C(N+1, vector<long long>(N+1));
    for (int i=0; i<=N; i++)
    {
        C[i][0] = 1;
        for (int j=1; j<i; j++)
            C[i][j] = (C[i-1][j-1]+C[i-1][j])%MOD;
        C[i][i] = 1;
    }

    //for (int i=0; i<=N; i++)
    //{
    //    for (int j=0; j<=i; j++)
    //        cout<<" "<<C[i][j];
    //    cout<<endl;
    //}

    vector<long long> T(N+1);
    T[0] = 1;
    for (int i=0; i<16; i++)
    {
        vector<long long> P(N+1);
        P.swap(T);
        for (int j=0; j<=N; j++)
            for (int k=0; k<=N; k+=2)
                if (j%2==(M>>i&1))
                    (T[(j>>1)+(k>>1)] += C[N][k]*P[j]%MOD) %= MOD;
    }
    cout<<T[0]<<endl;
}

#include <iostream>
#include <vector>
#include <string>
#include <array>
#include <functional>
#include <algorithm>
#include <stack>
#include <map>
#include <set>
#include <climits>
#include <queue>
#include <bitset>
#include <cassert>
#include <math.h>
#include <complex>
#include <iomanip>
#include <unordered_map>
using namespace std;
#define ll long long
#define pb(x) push_back(x)
#ifdef _OLIMPOLOCAL
    #define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
    #define debug(...) 1337
#endif
void debug_out() { cout << "\n";}
template<typename T1, typename... T2> void debug_out(T1 A, T2... B) { cout << " " << A; debug_out(B...); }
int test = 1;
#define out(x) {cout << x << "\n";return;}
#define all(N) N.begin(),N.end()
#define allr(N) N.rbegin(),N.rend()
template<typename T1> 
void pr(vector<T1> V, int add = 0, int start = -1, int end = -1) {
    if (start < 0) start = 0;
    if (end < 0) end = V.size() - 1;
    for (int i = start; i <= end; i++) {
        cout << V[i] + add << ((i == end) ? "\n" : " ");
    }
}
template<typename T1> 
T1 chmin(T1 &x, const T1 v) { return x = min(x,v); }
template<typename T1> 
T1 chmax(T1 &x, const T1 v) { return x = max(x,v); }

#define rep(i, n) for (int i = 0; i < n; i++)
#define reps(i, s, n) for (int i = s; i < n; i++)
#define repr(i, n) for (int i = n-1; i >= 0; i--)
#define repsr(i, s, n) for (int i = n-1; i >= s; i--)
#define PI pair<int,int>
template<typename T1> 
T1 gcd(const T1 &a, const T1 &b) {
    if (a == 0 || b == 0) return a + b;
    return gcd(b, a %b);
}
//-------------------------- ^ DONT TOUCH ^-----------------------------------------------------------------
#define MAX 200001 
#define MOD 998244353

long long power(long long x, long long n) {
    long long p = x;
    long long s = 1;
    while (n > 0) {
        if (n & 1) s = (s * p) % MOD;
        p = (p * p) % MOD;
        n /= 2;
    }
    return s;
}

vector<long long>_fact(2, 1);
long long Comb(int n, int k) {
    if (_fact.size() <= n) {
        int j = _fact.size();
        _fact.resize(n+1);
        for(long long i = j; i <=n; i++) {
            _fact[i] = (_fact[i-1] * i) % MOD;
        }
    }
    if (k == 0) return 1;
    if (k > n || k < 0) return 0;
    long long r = _fact[n];
    r = (r * power(_fact[k], MOD - 2)) % MOD;
    r = (r * power(_fact[n-k], MOD - 2)) % MOD;
    return r;
}

ll a;
int n;
ll M[15][5001];
bool H[15][5001];

ll comb(int pp, ll p, ll s) {
    if (p == 1) {
        if (n < s || s % 2 == 1) return 0;
        return Comb(n, s);
    }
    if (H[pp][s]) return M[pp][s];
    H[pp][s] = 1;

    ll v = 0;
    for(ll i = 0; (i * p <= s) && (i <= n); i+=2) {
        v += (comb(pp-1, p / 2, s - p * i) * Comb(n, i)) % MOD;
        v %= MOD;
    }
    return M[pp][s] = (v % MOD);
}

void solve() {
    int  m; cin >> n >> m;
    a = comb(14, 1 << 14, m);
    out(a);
}
 
int main() {
    ios_base::sync_with_stdio(0);cin.tie(0);
    int test = 1;
    //cin >> test;
    rep(testCase, test) {
        solve();
    }
    return 0;
}