#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < n; i++)
#define rep2(i, x, n) for(int i = x; i <= n; i++)
#define rep3(i, x, n) for(int i = x; i >= n; i--)
#define each(e, v) for(auto &e: v)
#define pb push_back
#define eb emplace_back
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define sz(x) (int)x.size()
using ll = long long;
using pii = pair<int, int>;
using pil = pair<int, ll>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
const int MOD = 1000000007;
//const int MOD = 998244353;
const int inf = (1<<30)-1;
const ll INF = (1LL<<60)-1;
template<typename T> bool chmax(T &x, const T &y) {return (x < y)? (x = y, true) : false;};
template<typename T> bool chmin(T &x, const T &y) {return (x > y)? (x = y, true) : false;};

struct io_setup{
    io_setup(){
        ios_base::sync_with_stdio(false);
        cin.tie(NULL);
        cout << fixed << setprecision(15);
    }
} io_setup;

int main(){
    int A, B; cin >> A >> B; A--;

    rep3(i, B, 1){
        if((B/i)-(A/i) >= 2) {cout << i << '\n'; return 0;}
    }
}
#include<bits/stdc++.h>
using namespace std;
#define Re register int
typedef long long ll;

const int N = 5005;
const int p = 998244353;
int n, m, k, t, fac[N], inv[N], f[15][5005];

inline int read()
{
	char c = getchar();
	int ans = 0;
	bool f = 1; 
	while (c < 48 || c > 57)
	{
		if (c == '-') f = 0;
		c = getchar();
	}
	while (c >= 48 && c <= 57) ans = (ans << 3) + (ans << 1) + (c ^ 48), c = getchar();
	return f ? ans : -ans;
}

inline ll fpow(ll x, int y)
{
	ll z = 1;
	while (y)
	{
		if (y & 1) z = z * x % p;
		x = x * x % p, y >>= 1;
	}
	return z;
}

inline ll C(int x, int y)
{
	return 1ll * fac[x] * inv[y] % p * inv[x - y] % p;
}

int main()
{
	n = read(), m = k = read(), fac[0] = fac[1] = 1;
	if (m & 1)
	{
		putchar(48);
		return 0;
	}
	for (Re i = 2; i <= n; ++i) fac[i] = 1ll * fac[i - 1] * i % p;
	inv[n] = fpow(fac[n], p - 2);
	for (Re i = n; i; --i) inv[i - 1] = 1ll * inv[i] * i % p;
	while (k) k >>= 1, ++t;
	f[t][0] = 1;
	for (Re i = t - 1; i; --i)
		for (Re j = 0; j <= m; j += (1 << i))
			for (Re k = 0; k * (1 << i) <= j && (k << 1) <= n; ++k) f[i][j] = (C(n, k << 1) * f[i + 1][j - k * (1 << i)] + f[i][j]) % p;
	printf("%d", f[1][m]);
	return 0;
}