#include #include using namespace std; using ll = long long; #define rep(i,n) for(int i=0;i<(int)(n);i++) void chmax(ll &a,ll b){ if(a; int main(){ int n,l,r; cin>>n>>l>>r; vector a(n); rep(i,n) cin>>a.at(i); sort(a.begin(),a.end()); auto isok=[&](ll x){ return l<=x&&x<=r; }; vector dp(n,segtree(n)); rep(chs,n){ dp.at(chs).set(chs,1); rep(i,chs){ if(isok(a.at(i)*a.at(chs))){ ll up=chs; ll dw=i; while(up-dw>1){ ll md=(up+dw)/2; if(isok(a.at(md)*a.at(chs))) dw=md; else up=md; } ll g=dp.at(i).prod(i,up); if(dp.at(i).get(chs)