#include #include #include long func(long a){ if(a%2 == 0) return 2; else{ long i ; for(i=3;i<= sqrt(a);i+=2){ if(a%i==0) return i; } } return a; } int main(){ long a,b,i,j,buff; long result , result_prime; long prime; scanf("%ld %ld",&a,&b); result_prime = func(a); for(i= result_prime; i<=sqrt(b);i+=2){ prime = func(i); if(prime>=result_prime){ ((a/i)>i)?(j=(a/i)):(j=i); for(j=buff;j<=b/i;j++){ if((i*j>=a)&&(i*j<=b)){ result_prime = prime; result = i*j; } } } } printf("%ld\n",result); return 0; }