#include using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); ll L, R; cin >> L >> R; int m = 100000; const int INF = 1 << 30; vector tb(m + 1, INF), p; tb[0] = tb[1] = 0; for(int i = 2; i <= m; i++){ if(tb[i] != INF) continue; p.emplace_back(i); for(int j = i; j <= m; j += i) tb[j] = min(tb[j], i); } auto f = [&](ll v){ for(auto &&v2 : p){ if(v % v2 == 0) return (ll)(v2); } return v; }; ll ans = 0, mn_prime = -1; for(ll i = min(m, int(sqrt(R) + 1)); i >= 2 && i >= mn_prime; i--){ ll bl = max(mn_prime, (L + i - 1) / i); for(ll j = R / i; j >= bl; j--){ ll v = f(j); if(tb[i] < v) v = tb[i]; if(v > mn_prime){ mn_prime = v; ans = i * j; }else if(v == mn_prime){ ans = max(ans, i * j); } } } cout << ans << '\n'; }