#include using namespace std; typedef long long ll; typedef vector vi; typedef vector vl; typedef complex P; typedef pair pii; #define REP(i,n) for(ll i=0;i=L && ub>1){ ll mfct=830252521; if(ub<125252 && isp[ub]){ mfct = ub; }else{ REP(j,ps.size()){ if(ub%ps[j]==0){ mfct=ps[j]; break; } } } ll fct = min(mfct,x); if(fct>mxmn || (fct==mxmn&&ub*x>ans)){ ans = ub*x; mxmn = fct; } --ub; } } printf("%lld\n",ans); return 0; }