#include using namespace std; using ll=long long; using pii=pair; #define all(a) a.begin(),a.end() #define pb push_back #define sz(a) ((int)a.size()) const int N=5005; int n,l,r,mn[N],mx[N]; ll a[N]; signed main(){ ios_base::sync_with_stdio(0),cin.tie(0); cin >> n >> l >> r; for(int i=0; i> a[i]; sort(a,a+n); for(int i=0; i=0; --j) if(a[i]*a[j]>=l&&a[i]*a[j]<=r){ mx[i]=j; break; } mn[i]=n; for(int j=i+1; j=l&&a[i]*a[j]<=r){ mn[i]=j; break; } } int res=1; for(int i=0; i=l&&a[i]*a[j]<=r){ int l=mn[i],r=mx[j]; if(l>r) res=max(res,2); else res=max(res,2+(r-l+1)); } cout << res << "\n"; }