#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define sf scanf
#define pf printf
#define pb push_back
#define mp make_pair
#define PI ( acos(-1.0) )
#define mod 1000000007LL
#define IN freopen("pieaters.in","r",stdin)
#define OUT freopen("pieaters.out","w",stdout)
#define FOR(i,a,b) for(i=a ; i<=b ; i++)
#define DBG pf("Hi\n")
#define i64 long long int
#define eps (1e-8)
#define xx first
#define yy second
#define ln 17
#define off 2

using namespace __gnu_pbds;
using namespace std ;

typedef tree< i64, null_type, less<i64>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
typedef pair<i64, i64> pii;

#define INF 2000000000
#define alpha 26

#define maxn 100010
#define LOG 18

class segmentTree{
public:

    vector <i64> tr , lazy ;
    int n ;

    segmentTree(){}
    void init( int _n )
    {
        tr = vector <i64>(4*(_n+1+3)) ;
        lazy = vector <i64>(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, i64 val)
    {
     //   printf("%d %d %d\n",cn,b,e) ;
        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 ;
    }
    i64 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, i64 val){update(1,0,n,left,right,val) ;}
    i64 Query(int left, int right){ return query(1,0,n,left,right) ; } ;
}sg[2] ;

i64 ara[maxn] ;

int FindIdx( int id , i64 x )
{
    int lo = 0 , hi = id-1 ;
    while( lo< hi )
    {
        int mid = (lo+hi+1)/2 ;
        if( ara[id]-ara[mid] >= x ) lo= mid ;
        else hi = mid - 1 ;
    }
    return lo ;
}

int main()
{
    int n ;

    i64 a , b ;

    scanf("%d %lld %lld",&n,&a,&b) ;

    for(int i=1 ; i<=n ; i++) scanf("%lld",&ara[i]) ;

    ara[0] = -INF ;

    sg[0].init(n) ;
    sg[1].init(n) ;

    sg[0].Update(0,0,1) ;
    sg[1].Update(0,0,1) ;

    for(int i=2 ; i<=n ; i++)
    {
        int k1 = FindIdx(i,a) , k2 = FindIdx(i,b) ;

        i64 sum1 = sg[1].Query(0,k1) , sum2 = sg[0].Query(0,k2) ;

        sg[0].Update( i-1,i-1,sum1 ) ; sg[1].Update(i-1,i-1,sum2) ;

        if( ara[i]-ara[i-1] < a ) sg[0].Update(0,i-2,0) ;
        if( ara[i]-ara[i-1] < b ) sg[1].Update(0,i-2,0) ;
    }

    i64 ans = sg[0].Query(0,n-1) + sg[1].Query(0,n-1) ;

    ans %= mod ;

    printf("%lld\n",ans) ;

    return 0 ;
}


Measured memory_bytes: 13696