#include <bits/stdc++.h>
using namespace std;

#define Gene template< class
#define Rics printer& operator,
Gene c> struct rge{c b, e;};
Gene c> rge<c> range(c i, c j){ return {i, j};}
struct printer{
    ~printer(){cerr<<endl;}
    Gene c >Rics(c x){ cerr<<boolalpha<<x; return *this;}
    Rics(string x){cerr<<x;return *this;}
    Gene c, class d >Rics(pair<c, d> x){ return *this,"(",x.first,", ",x.second,")";}
    Gene ... d, Gene ...> class c >Rics(c<d...> x){ return *this, range(begin(x), end(x));}
    Gene c >Rics(rge<c> x){
        *this,"["; for(auto it = x.b; it != x.e; ++it)
            *this,(it==x.b?"":", "),*it; return *this,"]";}
};
#define debug() cerr<<"LINE "<<__LINE__<<" >> ", printer()
#define dbg(x) "[",#x,": ",(x),"] "
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
int my_rand(int l, int r) {
    return uniform_int_distribution<int>(l, r) (rng);
}

const int N = 1e5+100;

typedef long long LL;

const LL mod = 1e9+7;

LL dp[N][2];
LL cum[N][2];
LL a[N];
int full[N][2];
LL prv[N][2];

int main() {
//    freopen("in.txt", "r", stdin);
    ios::sync_with_stdio(0);
    cin.tie(0);

    int n;
    cin >> n;
    LL A, B;
    cin >> A >> B;
    for(int i = 1; i <= n; i++) {
        cin >> a[i];
    }
    if(n == 1) {
        cout << "2" << endl;
        return 0;
    }

    full[1][0] = full[1][1] = 1;
    prv[1][0] = prv[1][1] = 1;
    for(int i = 2; i <= n; i++) {
        full[i][0] = (full[i-1][0] & (a[i]-a[i-1] >= A));
        full[i][1] = (full[i-1][1] & (a[i]-a[i-1] >= B));
        if(a[i]-a[i-1] >= A) prv[i][0] = prv[i-1][0];
        else prv[i][0] = i;
        if(a[i]-a[i-1] >= B) prv[i][1] = prv[i-1][1];
        else prv[i][1] = i;
    }
    dp[2][0] = dp[2][1] = 1;
    cum[2][0] = cum[2][1] = 1;
    for(int i = 3; i <= n; i++) {

//        for(int j = i-1; j >= 2; j--) {
//            if(j < i-1 && a[j+1]-a[j] < A) break;
//            if(a[i]-a[j-1] >= B) dp[i][0] += dp[j][1];
//        }


        int l = prv[i-1][0];
        if(a[i]-a[1] >= B) {
            int lo = 1, hi = i-2;
            while(hi > lo) {
                int mid = (lo+hi+1)/2;
                if(a[i]-a[mid] >= B) lo = mid;
                else hi = mid-1;
            }
            int r = lo+1;
            if(r >= l) {
                LL c = cum[r][1] - cum[l-1][1];
                if(c < mod) c += mod;
                dp[i][0] += c;
                dp[i][0] %= mod;
            }
        }

        dp[i][0] += full[i-1][0];
        dp[i][0] %= mod;

//        for(int j = i-1; j >= 2; j--) {
//            if(j < i-1 && a[j+1]-a[j] < B) break;
//            if(a[i]-a[j-1] >= A) dp[i][1] += dp[j][0];
//        }


        l = prv[i-1][1];
        if(a[i]-a[1] >= A) {
            int lo = 1, hi = i-2;
            while(hi > lo) {
                int mid = (lo+hi+1)/2;
                if(a[i]-a[mid] >= A) lo = mid;
                else hi = mid-1;
            }
            int r = lo+1;
            if(r >= l) {
                LL c = cum[r][0] - cum[l-1][0];
                if(c < mod) c += mod;
                dp[i][1] += c;
                dp[i][1] %= mod;
            }
        }

        dp[i][1] += full[i-1][1];
        dp[i][1] %= mod;

        cum[i][0] = (cum[i-1][0] + dp[i][0])%mod;
        cum[i][1] = (cum[i-1][1] + dp[i][1])%mod;
    }

    int ans = full[n][0] + full[n][1];
    for(int i = n; i >= 2; i--) {
        if(i < n && a[i+1] - a[i] < B) break;
        ans += dp[i][0];
        ans %= mod;
    }
    for(int i = n; i >= 2; i--) {
        if(i < n && a[i+1] - a[i] < A) break;
        ans += dp[i][1];
        ans %= mod;
    }
    cout << ans << endl;
}





Measured memory_bytes: 9936