// #define DEBUGGING
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define ALL(V) (V).begin(), (V).end()
#define ALLR(V) (V).rbegin(), (V).rend()

template <typename T> using V = vector<T>;
template <typename T> using VV = V<V<T>>;
using ll = int64_t;
using ull = uint64_t;
using PLL = pair<ll, ll>;

template <typename T> const T& var_min(const T &t) { return t; }
template <typename T> const T& var_max(const T &t) { return t; }
template <typename T, typename... Tail> const T& var_min(const T &t, const Tail&... tail) { return min(t, var_min(tail...)); }
template <typename T, typename... Tail> const T& var_max(const T &t, const Tail&... tail) { return max(t, var_max(tail...)); }
template <typename T, typename... Tail> void chmin(T &t, const Tail&... tail) { t = var_min(t, tail...); }
template <typename T, typename... Tail> void chmax(T &t, const Tail&... tail) { t = var_max(t, tail...); }
template <typename T> const T& clamp(const T &t, const T &low, const T &high) { return max(low, min(high, t)); }
template <typename T> void chclamp(T &t, const T &low, const T &high) { t = clamp(t, low, high); }

namespace init__ {

struct InitIO {
    InitIO() {
        cin.tie(nullptr);
        ios_base::sync_with_stdio(false);
        cout << fixed << setprecision(30);
    }
} init_io;

}

#ifdef DEBUGGING
// #include "../debug/debug.cpp"
#include "../../debug/debug.cpp"
#else
#define DEBUG(...) 0
#define DEBUG_SEPARATOR_LINE 0
#endif

template <typename T>
T make_v(T init) { return init; }

template <typename T, typename... Tail>
auto make_v(T init, size_t s, Tail... tail) {
#define rec make_v(init, tail...)
    return V<decltype(rec)>(s, rec);
#undef rec
}


template <typename T>
class Bit {
private:
    V<T> data;
    T identity_ele;

public:
    Bit(ll size, T identity_ele) : identity_ele(identity_ele) {
        ll newsize = 1;
        while(newsize < size) {
            newsize = newsize << 1;
        }
        data = V<T>(newsize + 1, identity_ele);
    }

    /*
     * 0-origin
     * sum of [0, pos)
     */
    T sum(ll pos) {
        T ret = identity_ele;
        while(pos > 0) {
            ret += data[pos];
            pos -= pos & -pos;
        }
        return ret;
    }

    /*
     * 0-origin
     * sum of [l, r)
     */
    T sum(ll l, ll r) {
        if(l == r) return 0;
        // if(r < l) assert(false);
        return sum(r) - sum(l);
    }

    /*
     * 0-origin
     */
    void add(ll pos, T delta) {
        pos++;
        while(pos <= data.size()) {
            data[pos] = data[pos] + delta;
            pos += pos & -pos;
        }
    }
};

const ll mod = 1e9 + 7;

// A < B
ll N, A, B;
Bit<ll> bit_a(1e5 + 10, 0), bit_b(1e5 + 10, 0);
V<ll> adj_a, adj_b;
V<ll> S;

ll solve() {
    cin >> N >> A >> B;
    if(A > B) swap(A, B);
    S.resize(N);
    for(auto &&ele : S) cin >> ele;

    for(ll i = 0; i < N - 2; i++) if(S[i + 2] - S[i] < A) return 0;

    for(ll i = 0; i < N - 1; i++) if(S[i + 1] - S[i] < A) adj_a.push_back(i + 1);
    for(ll i = 0; i < N - 1; i++) if(S[i + 1] - S[i] < B) adj_b.push_back(i + 1);
    bit_a.add(N, 1);
    adj_a.push_back(N + 1);
    bit_b.add(N, 1);
    adj_b.push_back(N + 1);

    for(ll i = N - 1; 0 <= i; i--) {
        // X
        [&] {
            ll left = i + 1;
            if(i) {
                auto ite = lower_bound(ALL(S), S[i - 1] + B);
                if(ite == S.end()) {
                    if(*lower_bound(ALL(adj_a), i + 1) == N + 1) bit_a.add(i, 1);
                    return;
                }
                auto idx = distance(S.begin(), ite);
                DEBUG(idx);
                chmax(left, idx);
            }
            ll right = *upper_bound(ALL(adj_a), i);
            if(left <= right + 1) {
                ll sum = bit_b.sum(left, right + 1) % mod;
                bit_a.add(i, sum);
                DEBUG(make_tuple("X", i, left, right, sum));
            }
        }();

        // Y
        {
            ll left = i + 1;
            ll right = *upper_bound(ALL(adj_b), i);
            if(left <= right + 1) {
                ll sum = bit_a.sum(left, right + 1) % mod;
                bit_b.add(i, sum);
                DEBUG(make_tuple("Y", i, left, right, sum));
            }
        }
    }

    return (bit_a.sum(0, 1) + bit_b.sum(0, 1)) % mod;
}

int main() {
    cout << solve() << endl;
    return 0;
}


Measured memory_bytes: 5364