/*
#include <boost/functional/hash.hpp>
#include <boost/multiprecision/cpp_int.hpp>
typedef boost::multiprecision::cpp_int mlint;
*/
#include <bits/stdc++.h>
using namespace std;

#define debug 0
#define print(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << endl
#define fcout(d) cout << fixed << setprecision(d)
#define each(i,v) for(auto i = begin(v); i != end(v); ++i)
#define reach(i,v) for(auto i = rbegin(v); i != rend(v); ++i)
#define urep(i,s,t) for(int i = (int)(s); i <= (int)(t); ++i)
#define drep(i,s,t) for(int i = (int)(s); i >= (int)(t); --i)
#define rep(i,n) urep(i,0,(n) - 1)
#define rep1(i,n) urep(i,1,(n))
#define rrep(i,n) drep(i,(n) - 1,0)
#define all(v) begin(v),end(v)
#define rall(v) rbegin(v),rend(v)
#define vct vector
#define prique priority_queue
#define l_bnd lower_bound
#define u_bnd upper_bound
#define rsz resize
#define ers erase
#define emp emplace
#define emf emplace_front
#define emb emplace_back
#define pof pop_front
#define pob pop_back
#define mkp make_pair
#define mkt make_tuple
#define fir first
#define sec second

typedef long long ll;
typedef double db;
typedef vct<vct<ll>> mat;
typedef pair<int,int> pii;
typedef tuple<int,int,int> tiii;
typedef map<int,int> mpii;
typedef unordered_map<int,int> umpii;

template <class T, class U> ostream& operator << (ostream& s, pair<T,U> p) { return s << p.fir << " " << p.sec; }
template <class T> ostream& operator << (ostream& s, vct<T> v) { each(i,v) { if(i != begin(v)) s << " "; s << *i; } return s; }

auto esc = [](auto ret) { cout << ret << endl; exit(0); };
auto odd = [](auto x) { return x & 1; };
auto even = [](auto x) { return !odd(x); };
auto qceil = [](auto x, auto y) { return x > 0 ? (x - 1) / y + 1 :  x / y; };
auto parity = [](auto x, auto y) { return odd(x) ^ even(y); };
auto chmax = [](auto& m, auto x) { if(m < x) { m = x; return 1; } return 0; };
auto chmin = [](auto& m, auto x) { if(m > x) { m = x; return 1; } return 0; };
auto cmprs  = [](auto v) {
    auto tmp = v;
    sort(all(tmp));
    tmp.erase(unique(all(tmp)),end(tmp));
    each(i,v) *i = l_bnd(all(tmp),*i) - begin(tmp) + 1;
    return v;
};

const int dir[8][2] = { {1,0},{0,1},{-1,0},{0,-1},{1,1},{-1,1},{-1,-1},{1,-1} };
const ll inf32 = (1 << 30) - 1;
const ll inf64 = (1LL << 62) - 1;
const ll mod = 1e9 + 7;
const db eps = 1e-15;

template <class Abel = int> struct Segtree {
    typedef function<Abel(const Abel&, const Abel&)> func_type;
    const func_type opr;
    const Abel idel;
    int range = 1;
    vector<Abel> data;

    Segtree(int sz, Abel init_val, const func_type& f = plus<Abel>(), Abel id = 0) : opr(f),idel(id)
    {
        while(sz >= range) range <<= 1;
        init(init_val);
    }

    Segtree(int sz, vector<Abel> init_arr, const func_type& f = plus<Abel>()) : opr(f)
    {
        while(sz >= range) range <<= 1;
        init(init_arr);
    }

    void init(Abel val) {
        data.resize(range << 1);
        fill(begin(data) + range,end(data),val);
        for(int idx = range - 1; idx; idx--) data[idx] = opr(data[idx * 2],data[idx * 2 + 1]);
    }

    void init(vector<Abel> arr) {
        data.resize(range << 1);
        for(int i = 0; i < range; i++) data[i + range] = arr[i];
        for(int idx = range - 1; idx; idx--) data[idx] = opr(data[idx * 2],data[idx * 2 + 1]);
    }

    void update(int idx, Abel val) {
        data[idx += range] = val;
        while(idx >>= 1) data[idx] = opr(data[idx * 2],data[idx * 2 + 1]);
    }

    void add(int idx, Abel diff = 1) { update(idx,data[idx + range] + diff); }

    // for the interval [l,r)
    Abel query(int l, int r) {
        l += range;
        r += range;
        Abel ret = idel;
        while(l < r) {
            if(l & 1) ret = opr(ret,data[l++]);
            if(r & 1) ret = opr(ret,data[--r]);
            l >>= 1, r >>= 1;
        }
        return ret;
    }
};

auto modplus = [](ll a,ll b){
    return ((a % mod) + (b % mod)) % mod;
};

ll N,A,B;
ll S[100001];

int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    cin >> N >> A >> B;
    if(A > B) swap(A,B);
    rep(i,N) cin >> S[i + 1];
    S[0] = -inf64;
    Segtree<ll> sgt(N,0,modplus,0);
    sgt.add(0);
    int bnd = 0;
    urep(i,1,N){
        int u = u_bnd(S,S + N,S[i] - B) - S;
        if(u > bnd) sgt.add(i,sgt.query(bnd,u));
        if(S[i] - S[i - 1] < A){
            if(i > 1 && S[i] - S[i - 2] < A){
                bnd = i;
            }else{
                bnd = i - 1;
            }
        }
    }
    esc(sgt.query(bnd,N + 1));
}


Measured memory_bytes: 3072