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

vector< int64_t > divisor(int64_t n) {
    vector< int64_t > ret;
    for(int64_t i = 1; i * i <= n; i++) {
    if(n % i == 0) {
        ret.push_back(i);
        if(i * i != n) ret.push_back(n / i);
    }
    }
    sort(begin(ret), end(ret));
    return (ret);
}

int main()
{
    int a, b;
    cin >> a >> b;

    vector<int> c(b + 10, 0);
    for (int i = a; i <= b; i++)
    {
        vector<int64_t> d = divisor(i);
        for (int j = 0; j < d.size(); j++)
        {
            c[d[j]]++;
        }
    }

    for (int i = b; i >= 0; i--)
    {
        if(c[i] >= 2)
        {
            cout << i << endl;
            break;
        }
    }
    
}
    #include <bits/stdc++.h>
    using namespace std;
    #include <math.h>
    #include <iomanip>
    #include <cstdint>
    #include <string>
    #include <sstream>
    template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
    template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
    #define rep(i,n) for (int i = 0; i < (n); ++i)
    typedef long long ll;
    using P=pair<ll,ll>;
    const ll INF=1e18;
    const int mod=998244353;
    
    struct mint {
      ll x; 
      mint(ll x=0):x((x%mod+mod)%mod){}
      mint operator-() const { return mint(-x);}
      mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
      }
      mint& operator-=(const mint a) {
        if ((x += mod-a.x) >= mod) x -= mod;
        return *this;
      }
      mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this;}
      mint operator+(const mint a) const { return mint(*this) += a;}
      mint operator-(const mint a) const { return mint(*this) -= a;}
      mint operator*(const mint a) const { return mint(*this) *= a;}
      mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t>>1);
        a *= a;
        if (t&1) a *= *this;
        return a;
      }
       
      mint inv() const { return pow(mod-2);}
      mint& operator/=(const mint a) { return *this *= a.inv();}
      mint operator/(const mint a) const { return mint(*this) /= a;}
     };
      istream& operator>>(istream& is, const mint& a) { return is >> a.x;}
      ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}
      struct combination {
      vector<mint> fact, ifact;
      combination(int n):fact(n+1),ifact(n+1) {
        assert(n < mod);
        fact[0] = 1;
        for (int i = 1; i <= n; ++i) fact[i] = fact[i-1]*i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i) ifact[i-1] = ifact[i]*i;
      }
      mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n]*ifact[k]*ifact[n-k];
      }
     } c(200005);

    int main(){
      int n,m;
      cin>>n>>m;
      vector<mint>dp(m+1);
      dp[0]=1;
      for(int i=2;i<=m;i+=2){
        for(int j=0;j*2<=n;j++){
          if(i/2-j<0){continue;}
          dp[i]+=c(n,2*j)*dp[i/2-j];
        }
      }
      cout<<dp[m]<<endl;
      return 0;
    }