//#include <bits/stdc++.h>
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;
//#include "boost/multiprecision/cpp_int.hpp"
//typedef boost::multiprecision::cpp_int LL;
typedef long double dd;
#define i_7 (ll)(1E9+7)
//#define i_7 998244353
#define i_5 i_7-2
ll mod(ll a){
    ll c=a%i_7;
    if(c>=0)return c;
    return c+i_7;
}
typedef pair<ll,ll> l_l;
typedef pair<dd,dd> d_d;
ll inf=(ll)1E16;
#define rep(i,l,r) for(ll i=l;i<=r;i++)
#define pb push_back
ll max(ll a,ll b){if(a<b)return b;else return a;}
ll min(ll a,ll b){if(a>b)return b;else return a;}
void Max(ll &pos,ll val){pos=max(pos,val);}//Max(dp[n],dp[n-1]);
void Min(ll &pos,ll val){pos=min(pos,val);}
void Add(ll &pos,ll val){pos=mod(pos+val);}
dd EPS=1E-9;
#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
#define fi first
#define se second
#define endl "\n"
#define SORT(v) sort(v.begin(),v.end())
#define ERASE(v) v.erase(unique(v.begin(),v.end()),v.end())
#define POSL(v,x) (lower_bound(v.begin(),v.end(),x)-v.begin())
#define POSU(v,x) (upper_bound(v.begin(),v.end(),x)-v.begin())
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}


void mod_print(ll k){
    ll P=1000;
    rep(y,1,P){
        ll x=mod(y*k);
        if(x+P>=i_7){
            x-=i_7;
        }
        if(abs(x)<=P){
            cout<<x<<"/"<<y<<endl;
            return;
        }
    }
    cout<<"nun"<<endl;
}
//////////////////////////


//from betrue12 Codeforces 1326E
template<typename F, typename T, typename Func_mf, typename Func_op, typename Func_mv>
struct LazySegtree {
    ll n, n_org;
    vector<T> dat;
    vector<F> laz;
    Func_mf merge_functions; //lazyとlazyの演算
    Func_op operate;       //dataとlazyの演算
    Func_mv merge_values;  //dataとdataの演算
    F fe; //lazyの単位元かつ初期値
    T te; //dataの単位元かつ初期値
 
    LazySegtree(){}
    LazySegtree(ll n_org,
                Func_mf merge_functions,
                Func_op operate,
                Func_mv merge_values,
                F fe, T te):
                n_org(n_org),
                merge_functions(merge_functions),
                operate(operate),
                merge_values(merge_values),
                fe(fe), te(te){
        n = 1;
        while(n < n_org) n <<= 1;
        dat.resize(2*n-1, te);
        laz.resize(2*n-1, fe);
    }
 
    void build(vector<T>& A){
        for(ll k=0; k<ll(A.size()); k++) dat[k+n-1] = A[k];
        for(ll k=n-2; k>=0; k--) dat[k] = merge_values(dat[2*k+1], dat[2*k+2]);
    }
    void update(ll a, ll b, F x){ //[a,b]をupdate
        update(a, b+1, x, 0, 0, n);
    }
    T get(ll a, ll b){ //[a,b]から(最小値とか和とかを)get
        return query(a, b+1, 0, 0, n);
    }
 
    
private:
    void eval(ll k, ll w){
        if(laz[k] == fe) return;
        operate(dat[k], laz[k], w);
        if(k < n-1){
            merge_functions(laz[2*k+1], laz[k]);
            merge_functions(laz[2*k+2], laz[k]);
        }
        laz[k] = fe;
    }
    T query(ll a, ll b, ll k, ll lb, ll rb){
        eval(k, rb-lb);
        if(rb<=a || b<=lb) return te;
        if(a<=lb && rb<=b) return dat[k];
        ll mb = (lb+rb)>>1;
        T vl = query(a, b, 2*k+1, lb, mb);
        T vr = query(a, b, 2*k+2, mb, rb);
        return merge_values(vl, vr);
    }
    void update(ll a, ll b, F x, ll k, ll lb, ll rb){
        eval(k, rb-lb);
        if(b <= lb || rb <= a) return;
        if(a <= lb && rb <= b){
            merge_functions(laz[k], x);
            eval(k, rb-lb);
        }else{
            ll mb = (lb+rb)>>1;
            update(a, b, x, 2*k+1, lb, mb);
            update(a, b, x, 2*k+2, mb, rb);
            dat[k] = merge_values(dat[2*k+1], dat[2*k+2]);
        }
    }
};
auto make_segtree = [](ll N){ //auto make_segtree = [&](ll N)
    //区間更新と区間和
    using F=ll;
    using T=ll;
    auto merge_functions=[](F& f,F& g){f=g;};
    auto operate = [](T& v, F& f, ll w){v=mod(f*w);};
    auto merge_values = [](T& a, T& b){return mod(a+b);};
    F fe = -inf;
    T te = 0;
    
    return LazySegtree<F, T, decltype(merge_functions), decltype(operate), decltype(merge_values)>
        (N, merge_functions, operate, merge_values, fe, te);
};
/*
auto st = make_segtree(n);
vector<ll> init(n);
st.build(init);
 */
ll po(ll i,ll p){
    if(p==0)return 1;
    else{
        i=mod(i);
        if(p==1)return i;
        if(p%2==0)return po(mod(i*i),p/2);
        return mod(i*po(i,p-1));
    }
}
ll bunbo(ll n){
    return po(n,i_5);
}



int main(){fastio
    inf=1E18+5;
    ll n,a,b;cin>>n>>a>>b;
    if(a>b)swap(a,b);
    vector<ll>s(n+1);
    s[0]=-inf;rep(i,1,n)cin>>s[i];
    auto dp=make_segtree(n+1);
    auto ep=make_segtree(n+1);
    dp.update(0,0,1);
    ep.update(0,0,1);
    
    /*
    cout<<0<<":"<<endl;
    rep(j,0,n)cout<<dp.get(j,j)<<" ";cout<<endl;
    rep(j,0,n)cout<<ep.get(j,j)<<" ";cout<<endl;*/
    
    rep(i,2,n){
        
        if(s[i]-s[i-1]>=b){
            dp.update(i-1,i-1,ep.get(0,i-2));
            ep.update(i-1,i-1,dp.get(0,i-2));
        }else if(s[i]-s[i-1]>=a){
            dp.update(i-1,i-1,ep.get(0,i-2));
            ep.update(0,i-2,0);
            ll k=POSU(s,s[i]-b)-1;
            ep.update(i-1,i-1,dp.get(0,k));
        }else{
            ll ka=POSU(s,s[i]-a)-1;
            ll kb=POSU(s,s[i]-b)-1;
            ll resa=ep.get(0,ka);
            ll resb=dp.get(0,kb);
            dp.update(0,i-2,0);
            ep.update(0,i-2,0);
            dp.update(i-1,i-1,resa);
            ep.update(i-1,i-1,resb);
        }
        /*
        cout<<i<<":"<<endl;
        rep(j,0,n)cout<<dp.get(j,j)<<" ";cout<<endl;
        rep(j,0,n)cout<<ep.get(j,j)<<" ";cout<<endl;*/
        
    }
    ll ans=mod(dp.get(0,n)+ep.get(0,n));
    cout<<ans<<endl;
    
    return 0;
}


Measured memory_bytes: 9216