#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; #define MAX_PRIME 105000 bool isprime[MAX_PRIME+1]; vector primes; void init_prime(){ fill(isprime, isprime+MAX_PRIME+1, true); isprime[0] = isprime[1] = false; for(int i = 2; i <= MAX_PRIME; i++) { if (isprime[i]) { primes.push_back(i); for(int j = i*2; j <= MAX_PRIME; j += i) isprime[j] = false; } } } ll findmin(ll x){ ll d, q; while(x>=4 && x%2==0){ return 2; x/=2;} d = 3; q = x/d; while(q>=d){ if(x%d==0){ return d; x=q; }else{ d+=2; } q=x/d; } return x; } int main(){ ios::sync_with_stdio(false); init_prime(); ll L, H; cin >> L >> H; for(int i=primes.size()-1; i>=0; i--){ ll p = primes[i]; if(H=2; j--){ if(p*j 0){ cout << ret << endl; break; } } return 0; }