//#define  NDEBUG

//#pragma optimize("tree-vectorize")
//#pragma optimize ("fast-math")
//#pragma optimize ("O3")

#include <bits/stdc++.h>

using namespace std;

#define all(v)                  v.begin(), v.end()
#define db(x)                   cout << #x << " = " << (x) << "\n"
#define fend(x)                 ((x) & ((x)+1)) - 1
#define fenu(x)                 (x) | ((x)+1)
#define forn(i, n)              for (int i = 0; i < (int)n; ++i)
#define forr(i, b, e)           for (int i = b; i < (int)e; ++i)
#define ft                      first
#define len(s)                  s.length()
#define mp                      std::make_pair
#define pob                     pop_back
#define pof                     pop_front
#define pub                     push_back
#define puf                     push_front
#define sc                      second

typedef double dbl;
typedef long double ldbl;
typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;

const long long MILLER_RABIN = 3215031751;
const long double PI = acos(-1);

#if __cplusplus >= 201103L

struct config_io {
    config_io() {
        cin.tie(nullptr);
        cout.tie(nullptr);
        ios_base::sync_with_stdio(false);
    }
} cnf_io;

struct config_rand {
    config_rand() {
        srand(chrono::duration_cast<chrono::nanoseconds>(
                chrono::high_resolution_clock::now().time_since_epoch()).count());
    }
} cnf_rand;

namespace std {
    template<>
    struct hash<pair<int, int> > {
        size_t operator()(const pair<int, int>& x) const {
            return (x.first * 71ll + x.second) % ((int) 1e9 + 7);
        }
    };

    template<>
    struct hash<vector<int>> {
        size_t operator()(const vector<int>& v) const {
            size_t hsh = 0;
            for (int i = 0; i < v.size(); ++i) {
                hsh = (hsh * 71ll + v[i]) % (int) (1e9 + 7);
            }
            return hsh;
        }
    };
}

// __builtin_popcount(x) - Returns the number of 1-bits in x.
// __builtin_parity(x) - Returns the parity of x, i.e. the number of 1-bits in x modulo 2.
// __builtin_ffs(x) - Returns one plus the index of the least significant 1-bit of x, or if x is zero, returns zero.
// __builtin_clz(x) - Returns the number of leading 0-bits in x, starting at the most significant bit position. If x is 0, the result is undefined.
// __builtin_ctz(x) - Returns the number of trailing 0-bits in x, starting at the least significant bit position. If x is 0, the result is undefined.

//inline string tobin(long long x) { bitset<63>(x).to_string(); }


template<class T>
void trace(T collection) {
    for (auto elem : collection) { cout << elem << " "; }
    cout << endl;
}

#endif

struct fenw {
    static const int MOD = 1e9 + 7;
    static const int ML = 1e5 + 10;
    int t[ML];
    stack<int> was_upd;

    fenw() { fill(t, t + ML, 0); }

    void clear() {
        while (!was_upd.empty()) {
            t[was_upd.top()] = 0;
            was_upd.pop();
        }
    }

    int sum(int r) {
        int res = 0;
        for (; r >= 0; r = fend(r)) {
            res = (res + t[r]) % MOD;
        }
        return res;
    }

    int sum(int l, int r) {
        return (((sum(r) - sum(l - 1)) % MOD) + MOD) % MOD;
    }

    int upd(int pos, int value) {
        int delta = value - sum(pos, pos);
        for (; pos < ML; pos = fenu(pos)) {
            t[pos] = (((t[pos] + value) % MOD) + MOD) % MOD;
            was_upd.push(pos);
        }
    }
};

int doit(vector<ll>& a, ll A, ll B) {
    const int MOD = 1e9 + 7;
    int n = a.size();
    fenw dpx, dpy;
    dpx.upd(0, 1);
    //dpx.upd(1, 1);
    dpy.upd(0, 1);
    //dpy.upd(1, 1);
    for (int i = 2; i < n; ++i) {
        int last_validx = upper_bound(all(a), a[i] - A) - a.begin() - 1;
        int last_validy = upper_bound(all(a), a[i] - B) - a.begin() - 1;
        int sumy = dpy.sum(0, last_validx);
        int sumx = dpx.sum(0, last_validy);
        if (a[i] - a[i - 1] < A) {
            dpx.clear();
        }
        dpx.upd(i - 1, sumy);
        if (a[i] - a[i - 1] < B) {
            dpy.clear();
        }
        dpy.upd(i - 1, sumx);
    }
    int ans = 0;
    forn(i, n) {
        ans = (ans + dpx.sum(i, i)) % MOD;
        ans = (ans + dpy.sum(i, i)) % MOD;
    }
    cout << ans << endl;
//    forn(i, n + 1) {
//        cout << dpx.sum(i, i) << " ";
//    }
//    cout << endl;
//    forn(i, n + 1) {
//        cout << dpy.sum(i, i) << " ";
//    }
//    cout << endl;
}

void solve(int test) {
    ll n, A, B;
    cin >> n >> A >> B;
    vector<ll> a(n + 1);
    a[0] = -1e18;
    forn(i, n) cin >> a[i + 1];
    doit(a, A, B);
}

int main() {
#ifdef HOME
    freopen("home.in", "r", stdin);
    freopen("home.out", "w", stdout);
#endif

    int tests = 1;
    //cin >> tests;
    for (int test = 1; test <= tests; ++test) {
        solve(test);
    }

#ifdef HOME
    cout << "\n\nTime: " << clock() / (double) CLOCKS_PER_SEC << endl;
#endif
    return 0;
}

Measured memory_bytes: 9088