///Bismillahir Rahmanir Rahim
#include<bits/stdc++.h>

#define                           int                         long long
#define                           fi                          first
#define                           si                          second
#define                           mp                          make_pair
#define                           pb                          push_back
#define                           pi                          pair<int,int>
#define                           f(i,l,r)                    for(int i=l;i<=r;i++)
#define                           rf(i,r,l)                   for(int i=r;i>=l;i--)
#define                           done(i)                     cout<<"done = "<<i<<endl;
#define                           fast                        ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define                           ll                          long long



using namespace std;

const int inf=1e18;
const int mod=1e9+7;
const int M=100009;
inline int bigmod(int B,int P){int R=1;while(P>0){if(P&1){R=(R*B)%mod;}P>>=1;B=(B*B)%mod;}return R;}

int a[M+4];

class segmentTree{
public:

    vector <ll> tr , lazy ;
    int n ;

    segmentTree(){}
    void init( int _n )
    {
        tr = vector <ll>(4*(_n+1+3)) ;
        lazy = vector <ll>(4*(_n+1+3)) ;
        n = _n ;
        build(1,0,n) ;
    }
    void build(int cn, int b, int e)
    {
        lazy[cn] = -1 ;
        if( b>e ) return ;
        if( b==e )
        {
            tr[cn] = 0 ;
            return ;
        }
        int l = cn*2 , r = cn*2+1 , m = (b+e)/2 ;
        build(l,b,m) ;
        build(r,m+1,e) ;
        tr[cn] = tr[l]+tr[r] ;
    }
    void relax( int cn, int b, int e )
    {
        tr[cn] =  (1LL*(e-b+1)*lazy[cn])%mod ;
        if( b!=e )
        {
            int l = cn*2 , r = cn*2+1 ;
            lazy[l] = lazy[cn] ;
            lazy[r] = lazy[cn] ;
        }
        lazy[cn] = -1 ;
    }
    void update(int cn, int b, int e ,int left , int right, ll val)
    {
        if( b>e ) return ;
        if(lazy[cn]!=-1) relax(cn,b,e) ;
        if( e<left || b>right ) return ;
        if( b>= left && e<=right )
        {
            lazy[cn] = val ;
            relax(cn,b,e) ;
            return ;
        }
        int l = cn*2 , r = cn*2+1 , m = (b+e)/2 ;
        update(l,b,m,left,right,val) ;
        update(r,m+1,e,left,right,val) ;
        tr[cn] = (tr[l]+tr[r])%mod ;
    }
    ll query(int cn, int b, int e ,int left,int right)
    {
        if(b>e) return 0LL ;
        if(lazy[cn]!=-1) relax(cn,b,e) ;
        if( b>right || e<left ) return 0 ;
        if( b>= left && e<=right ) return tr[cn] ;
        int l = cn*2 , r = cn*2+1 , m = (b+e)/2 ;
        return ( query(l,b,m,left,right) + query(r,m+1,e,left,right) )%mod ;
    }
    void Update(int left, int right, ll val){update(1,0,n,left,right,val) ;}
    ll Query(int left, int right){ return query(1,0,n,left,right) ; } ;
};
segmentTree s[2];
int fnd(int id,int lim)
{
    int lo=0;
    int hi=id-1;
    while(lo<hi)
    {
        int mid=(lo+hi+1)/2;
        if(a[id]-a[mid]>=lim)lo=mid;
        else hi=mid-1;
    }
    return lo;
}
 main()

{
    fast
    int n,A,B;
    cin>>n>>A>>B;
    f(i,1,n)cin>>a[i];
    a[0]=-inf;
    s[0].init(n);s[1].init(n);
    s[0].Update(0,0,1);
    s[1].Update(0,0,1);
    f(i,2,n)
    {
          int idx1=fnd(i,A);
          int sum1=s[1].Query(0,idx1);
          int idx2=fnd(i,B);
          int sum2=s[0].Query(0,idx2);
          s[0].Update(i-1,i-1,sum1);
          s[1].Update(i-1,i-1,sum2);
          if(a[i]-a[i-1]<A)s[0].Update(0,i-2,0);
          if(a[i]-a[i-1]<B)s[1].Update(0,i-2,0);
    }
    int ses=s[0].Query(0,n-1)+s[1].Query(0,n-1);
    ses=ses%mod;
    cout<<ses<<endl;
    return 0;
}


Measured memory_bytes: 13568