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

#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define eb emplace_back

typedef long long ll;
typedef pair<int, int> pi;

int n;
ll A, B;
const int maxn = 1e5 + 5;
ll S[maxn];

int dp[2][maxn];
int pre[2][maxn];
const int mod = 1e9 + 7;

void add(int &a, int b){
    a += b;
    if(a >= mod)
        a -= mod;
}

struct segment_tree{
    int sumv[maxn << 2];
    int setv[maxn << 2];
    #define lson o*2,l,mid
    #define rson o*2+1,mid+1,r
 
    void pushup(int o){
        sumv[o] = 0;
        add(sumv[o], sumv[o*2]);
        add(sumv[o], sumv[o*2+1]);
    }
 
    void pushdown(int o){
        if(setv[o]){
            setv[o*2] = setv[o];
            setv[o*2+1] = setv[o];
            sumv[o*2] = 0;
            sumv[o*2+1] = 0;
            setv[o] = 0;
        }
    }
 
    void build(int o, int l, int r){
        sumv[o] = 0;
        setv[o] = 0;
        if(l == r)
            return;
        int mid = (l + r) / 2;
        build(lson);
        build(rson);
    }
 
    void update(int o, int l, int r, int p, int v){
        if(l == r){
            add(sumv[o], v);
            return;
        }
        int mid = (l + r) / 2;
        pushdown(o);
        if(p <= mid)
            update(lson, p, v);
        if(p > mid)
            update(rson, p, v);
        pushup(o);
    }

    void zero(int o, int l, int r, int ql, int qr){
        if(ql <= l and r <= qr){
            sumv[o] = 0;
            setv[o] = 1;
            return;
        }
        int mid = (l + r) / 2;
        pushdown(o);
        if(ql <= mid)
            zero(lson, ql, qr);
        if(qr > mid)
            zero(rson, ql, qr);
        pushup(o);
    }
 
    int query(int o, int l, int r, int ql, int qr){
        if(ql > qr)
            return 0;
        if(ql <= l && r <= qr){
            return sumv[o];
        }
        int mid = (l + r) / 2;
        pushdown(o);
        if(qr <= mid)
            return query(lson, ql, qr);
        if(ql > mid)
            return query(rson, ql, qr);
        int ans = query(lson, ql, qr);
        add(ans, query(rson, ql, qr));
        return ans;
    }
}t[2];

int main(){
    ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    cin >> n >> A >> B;
    for(int i = 1;i <= n;i++){
        cin >> S[i];
    }
    for(int i = 0;i < 2;i++){
        t[i].build(1, 1, n);
        t[i].update(1, 1, n, 1, 1);
    }
    for(int i = 2;i <= n;i++){
        int l = 0, r = i - 1;
        while(l < r){
            int mid = (l + r + 1) / 2;
            if(S[i] - S[mid] >= A)
                l = mid;
            else
                r = mid - 1;
        }
        int val1 = t[1].query(1, 1, n, 1, l + 1);
        l = 0,r = i - 1;
        while(l < r){
            int mid = (l + r + 1) / 2;
            if(S[i] - S[mid] >= B)
                l = mid;
            else
                r = mid - 1;
        }
        int val2 = t[0].query(1, 1, n, 1, l + 1);
        if(S[i] - S[i - 1] < A){
            t[0].zero(1, 1, n, 1, i);
        } 
        t[0].update(1, 1, n, i, val1);
        if(S[i] - S[i - 1] < B){
            t[1].zero(1, 1, n, 1, i);
        }
        t[1].update(1, 1, n, i, val2);
    }
    int ans = t[0].query(1, 1, n, 1, n);
    add(ans, t[1].query(1, 1, n, 1, n));
    cout << ans << endl;
    return 0;
}


Measured memory_bytes: 8320