#include <iostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <queue>
#include <set>
#include <algorithm>
#include <string>
#include <math.h>
#include <limits.h>
#include <stack>
#include <complex>
#include <stdlib.h>
#include <stdio.h>
#include <functional>
#include <cfloat>
#include <math.h>
#include <numeric>
#include <string.h>
#include <sys/time.h>
#include <random>


#define fs first
#define sc second
#define endl "\n"

using namespace std;

typedef long long ll;
typedef unsigned int uint;
typedef pair<int, int> P;


class modInt{
    ll value;
    static const ll mod = 1000000007;

public:
    modInt(ll x=0): value{x % mod}{}

    inline modInt& operator+=(modInt x){
        value = (value + x.value) % mod;
        return *this;
    }

    inline modInt& operator-=(modInt x){
        value = (value + mod - x.value) % mod;
        return *this;
    }

    inline modInt& operator*=(modInt x){
        value = (value * x.value) % mod;
        return *this;
    }


    inline modInt operator/=(modInt x){
        *this *= x.inv();
        return *this;
    }

    inline modInt pow(modInt x, int n){
        modInt res = modInt(1LL);
        while(n > 0){
            if(n & 1)   res *= x;
            x *= x;
            n >>= 1;
        }
        return res;
    }

    inline modInt inv(){
        modInt res = pow(value, mod-2);
        return res;
    }

    inline ll get(){
        return value;
    }
};

modInt operator+(modInt x, modInt y){
    return x += y;
}

modInt operator-(modInt x, modInt y){
    return x -= y;
}

modInt operator*(modInt x, modInt y){
    return x *= y;
}

modInt operator/(modInt x, modInt y){
    return x /= y;
}

ostream& operator<<(ostream& os, modInt x){
    return os << x.get();
}


class modIntCombinations{
    vector<modInt> factArray;

    void make_fact(ll x){
        for(auto i = factArray.size(); i <= x+1; i++){
            modInt y = factArray[i-1] * i;
            factArray.push_back(y);
        }
    }

public:
    modIntCombinations(){
        factArray.emplace_back(1);
    }

    modInt fact(ll x){
        if(factArray.size() < x+1){
            make_fact(x);
        }
        return factArray[x];
    }

    modInt comb(ll n, ll k){
        if(n < k){
            return modInt{0};
        }
        else{
            return fact(n) / fact(k) / fact(n - k);
        }
    }

    modInt perm(ll n, ll k){
        if(n < k){
            return modInt{0};
        }
        else{
            return fact(n) / fact(k);
        }
    }
};


template <typename T>
class SegmentTree {
private:
    using F = function<T(T, T)>;
    int n, sz;
    vector<T> node;
    T u;
    F f;

    T query(int a, int b, int i, int l, int r) {
        if(r <= a || b <= l) {
            return u;
        }
        else if(a <= l && r <= b) {
            return node[i];
        }
        else {
            T vl = query(a, b, 2 * i + 1, l, (l + r) / 2);
            T vr = query(a, b, 2 * i + 2, (l + r) / 2, r);
            return f(vl, vr);
        }
    }

public:
    /**
     *
     * @param v  初期配列
     * @param func  nodeに対する操作
     * @param u2  Tの単位元
     */
    SegmentTree(vector<T> &v, const F func, T u2) : f(func), u(u2) {
        sz = v.size();
        n = 1;
        while(n < sz) {
            n *= 2;
        }
        node.resize(2 * n - 1, u2);
        for(int i = 0; i < sz; i++) {
            node[i + n - 1] = v[i];
        }
        for(int i = n - 2; i >= 0; i--) {
            node[i] = f(node[2 * i + 1], node[2 * i + 2]);
        }
    }

    void update(int i, T val) {
        i += (n - 1);
        node[i] = val;
        while(i > 0) {
            i = (i - 1) / 2;
            node[i] = f(node[2 * i + 1], node[2 * i + 2]);
        }
    }

    T query(int l, int r){
        return query(l, r, 0, 0, n);
    }

    T operator[](const int &i) const { return node[i + n - 1]; }
};



int main(){
    int n; ll a, b; cin >> n >> a >> b;
    if(a > b)   swap(a, b);

    vector<ll> s(n+1);
    s[0] = LONG_LONG_MIN / 2;
    for(int i = 1; i <= n; i++){
        cin >> s[i];
    }

    vector<modInt> init_vector(n+1, modInt{0});
    SegmentTree<modInt> seg(init_vector, [](modInt x, modInt y){ return x + y; }, modInt{0});

    seg.update(0, modInt{1});
    seg.update(1, modInt{1});

    int lastJ = 0;
    for(int i = 1; i < n; i++){
        int index = upper_bound(s.begin(), s.end(), s[i+1] - b) - s.begin();
        seg.update(i+1, seg.query(0, index));
        if(s[i+1] - s[i-1] < a){
            for(int j = lastJ; j < i+1; j++){
                seg.update(j, modInt{0});
            }
            lastJ = i+1;
        }
        else if(s[i+1] - s[i] < a){
            for(int j = lastJ; j < i; j++){
                seg.update(j, modInt{0});
            }
            lastJ = i;
        }
    }

    modInt res{0};
    for(int i = 0; i <= n; i++){
        res += seg[i];
    }

    cout << res << endl;


    return 0;
}


Measured memory_bytes: 3840