// Template {{{
#include <bits/stdc++.h>
#define REP(i,n) for(int i=0; i<(int)(n); ++i)
using namespace std;
typedef long long LL;

#ifdef LOCAL
#include "contest.h"
#else
#define error(args...) 
#endif

const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
inline bool valid(int x, int w) { return 0 <= x && x < w; }

void iostream_init() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.setf(ios::fixed);
    cout.precision(12);
}
//}}}

// ModInt (ref. anta) {{{
template<int MOD>
struct ModInt{
    static const int Mod = MOD;
    unsigned val;
    ModInt():val(0){}
    ModInt(unsigned x):val(x%MOD){}
    ModInt(signed x) {
        int y = x % MOD;
        if(y < 0) y += MOD;
        val = y;
    }
    ModInt(signed long long x) {
        int y = (int)(x % MOD);
        if(y < 0) y += MOD;
        val = y;
    }

    ModInt &operator+=(ModInt rhs) {
        val += rhs.val;
        if(val >= MOD) val -= MOD;
        return *this;
    }
    ModInt &operator-=(ModInt rhs) {
        val += MOD - rhs.val;
        if(val >= MOD) val -= MOD;
        return *this;
    }
    ModInt &operator*=(ModInt rhs) {
        val = (unsigned)((unsigned long long)val * rhs.val % MOD);
        return *this;
    }
    ModInt &operator/=(ModInt rhs) {
        return *this *= rhs.inv();
    }

    ModInt inv() const {
        signed a = val, b = MOD, u = 1, v = 0;
        while(b) {
            signed t = a / b;
            a -= t * b; std::swap(a, b);
            u -= t * v; std::swap(u, v);
        }
        if(u < 0) u += MOD;
        ModInt res;
        res.val = u;
        return res;
    }

    ModInt operator+(ModInt rhs) const {
        return ModInt(*this) += rhs;
    }
    ModInt operator-(ModInt rhs) const {
        return ModInt(*this) -= rhs;
    }
    ModInt operator*(ModInt rhs) const {
        return ModInt(*this) *= rhs;
    }
    ModInt operator/(ModInt rhs) const {
        return ModInt(*this) /= rhs;
    }

    // compare
    bool operator==(ModInt rhs) const {
        return val == rhs.val;
    }
    bool operator!=(ModInt rhs) const {
        return val != rhs.val;
    }
    bool operator< (ModInt rhs) const {
        return val <  rhs.val;
    }
    bool operator<=(ModInt rhs) const {
        return val <= rhs.val;
    }
    bool operator> (ModInt rhs) const {
        return val >  rhs.val;
    }
    bool operator>=(ModInt rhs) const {
        return val >= rhs.val;
    }
};
template<int MOD>
ostream& operator << (ostream& os, const ModInt<MOD> m) {
    return os << m.val;
}
template<int MOD, typename T>
ModInt<MOD> pow(ModInt<MOD> a, T b) {
    if(b == 0) {
        return 1;
    } else {
        auto w = pow(a*a, b/2);
        if(b&1) w *= a;
        return w;
    }
}
// }}}
typedef ModInt<1000000007> mint;
// {{{
template<typename T, typename Comp=less<T>>
class SparseTable{
private:
    Comp comp;
    int N, K;
    vector<T> value;
    vector<vector<int>> idx;

    inline int log2(int x) {
        return 31 - __builtin_clz(x);
    }

public:
    SparseTable(const vector<T>& v) : value(v) {
        N = (int)v.size();
        K = log2(N) + 1;

        idx.resize(K);
        idx[0].resize(N);
        REP(i, N) idx[0][i] = i;

        for(int log = 0; log+1 < K; log++) {
            const int L = N+1 - (1<<(log+1));
            idx[log+1].resize(L);
            for(int i = 0; i < L; i++) {
                const int p = idx[log][i];
                const int q = idx[log][i+(1<<log)];
                idx[log+1][i] = (comp(v[p], v[q]) ? p : q);
            }
        }
    }

    // return index of minimum/maximum value in v[b], ..., v[e-1]
    int query_idx(int b, int e) {
        const int log = log2(e-b);
        const int p = idx[log][b];
        const int q = idx[log][e-(1<<log)];
        return (comp(value[p], value[q]) ? p : q);
    }

    // return minimum/maximum value in v[b], ..., v[e-1]
    T query(int b, int e) {
        assert(b >= 0);
        b = max(0, b);
        assert(e <= N);
        e = min(N, e);
        if(e - b <= 0) return LLONG_MAX; // only this code
        return value[query_idx(b, e)];
    }
};

// }}}

int N;
LL A, B;

// #define error(...) 
// #define assert(...)


mint calc(const vector<LL>& v) {
    error(v.size());
    if(v.size() == 1) {
        return mint(2);
    }

    assert(A <= B && A >= 1 && B >= 1);
    vector<LL> diffs;
    for(int i = 0; i+1 < v.size(); i++) {
        assert(v[i+1] - v[i] < B);
        diffs.push_back(v[i+1] - v[i]);
    }
    diffs.push_back(LLONG_MAX);
    SparseTable<LL> sp(diffs);

    vector<mint> dp(v.size()+1);
    dp[0] = 1;

    for(int i = 0; i < v.size(); i++) {
        cerr << endl;
        error(i, dp[i]);
        if(!(i > 0 && v[i] - v[i-1] < A)) {
            // a
            dp[i+1] += dp[i];
            error(dp[i+1]);
        }
        {
            // b
            const LL nx = v[i] + B;
            size_t ni = lower_bound(v.begin(), v.end(), nx) - v.begin();
            if(ni - i == 1) {
                error(ni, v.size());
                assert(ni == v.size());
                dp[ni] += dp[i];
            } else {
                LL min_diff = sp.query(i+1, (int)ni-1);
                if(i+1 < v.size() && i-1 >= 0) {
                    min_diff = min(min_diff, v[i+1] - v[i-1]);
                }
                if(min_diff >= A) {
                    dp[ni] += dp[i];
                }
                error(nx, ni, min_diff, A, dp[ni]);
            }
        }
    }

    return dp.back();
}

signed main(){
    iostream_init();
    while(cin >> N >> A >> B) {
        if(A > B) swap(A, B);

        vector<vector<LL>> VS;
        vector<LL> cur;
        REP(i, N) {
            LL x;
            cin >> x;
            if(cur.size() > 0 && cur.back() + B <= x) {
                VS.push_back(cur);
                cur.assign(1, x);
            } else {
                cur.push_back(x);
            }
        }
        VS.push_back(cur);

        mint res = 1;
        for(const auto& v : VS) {
            res *= calc(v);
        }

        cout << res << endl;
        break;
    }

    return 0;
}



Measured memory_bytes: 9972