#include <bits/stdc++.h>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using ld = long double;

#define forn(i, a, n) for (int i = a; i < n; ++i)
#define ford(i, a, n) for (int i = n - 1; i >= a; --i)
#define fore(i, a, n) for (int i = a; i <= n; ++i)
#define all(a) (a).begin(), (a).end()
#define fs first
#define sn second
#define trace(a)\
    for (auto i : a) cerr << i << ' ';\
    cerr << '\n'
#define eb emplace_back

#ifndef M_PI
const ld M_PI = acos(-1.0);
#endif

const ld eps = 1e-9;
const int INF = 2000000000;
const ll LINF = 1ll * INF * INF;
const ll MOD = 1000000007;

void add(ll &x, ll y) {
    x += y;
    if (x >= MOD) x -= MOD;
}

void rem(ll &x, ll y) {
    x -= y;
    if (x < 0) x += MOD;
}

vector<int> prevs(vector<ll> &s, ll d) {
    int n = s.size();
    vector<int> ans(n);
    ans[0] = 0;
    forn(i, 1, n) {
        if (s[i] - s[i - 1] >= d) ans[i] = ans[i - 1];
        else ans[i] = i;
    }
    return ans;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int n;
    ll a, b;
    cin >> n>> a >> b;
    n += 2;
    vector<ll> s(n);
    s[0] = -4e18;
    s[1] = -2e18;
    forn(i, 2, n) cin >> s[i];
    vector<int> prev_x = prevs(s, a), prev_y = prevs(s, b);
    vector<ll> ans_xx(n), ans_xy(n), ans_yx(n), ans_yy(n);
    vector<ll> sum_xx(n), sum_xy(n), sum_yx(n), sum_yy(n);
    forn(i, 0, 2) {
        ans_yy[i] = ans_yx[i] = ans_xy[i] = ans_xx[i] = 1;
        sum_yy[i] = sum_yx[i] = sum_xy[i] = sum_xx[i] = i + 1;
    }
    
    forn(i, 2, n) {
        if (s[i] - s[i - 1] >= a) {
            ans_xx[i] = ans_xx[i - 1];
            add(ans_xx[i], ans_yx[i - 1]);
        }
        sum_xx[i] = sum_xx[i - 1];
        add(sum_xx[i], ans_xx[i]);

        if (s[i] - s[i - 1] >= b) {
            ans_yy[i] = ans_yy[i - 1];
            add(ans_yy[i], ans_xy[i - 1]);
        }
        sum_yy[i] = sum_yy[i - 1];
        add(sum_yy[i], ans_yy[i]);

        if (s[i] - s[i - 2] >= a)
            ans_yx[i] = ans_xy[i - 1];

        int j_max = lower_bound(all(s), s[i] - a + 1) - s.begin() - 1;
        int j_min = prev_y[i - 1] - 1;
        j_max = min(j_max, i - 3);
        //cerr << j_min << ' ' << j_max << '\n';
        if (j_min == -1 && j_max == -1) add(ans_yx[i], 1);
        else if (j_min <= j_max) {
            add(ans_yx[i], sum_xy[j_max + 1]);
            if (j_min >= 0) rem(ans_yx[i], sum_xy[j_min]);
        }
        sum_yx[i] = sum_yx[i - 1];
        add(sum_yx[i], ans_yx[i]);

        if (s[i] - s[i - 2] >= b)
            ans_xy[i] = ans_yx[i - 1];

        j_max = lower_bound(all(s), s[i] - b + 1) - s.begin() - 1;
        j_min = prev_x[i - 1] - 1;
        j_max = min(j_max, i - 3);
        //cerr << j_min << ' ' << j_max << '\n';
        if (j_min == -1 && j_max == -1) add(ans_xy[i], 1);
        else if (j_min <= j_max) {
            add(ans_xy[i], sum_yx[j_max + 1]);
            if (j_min >= 0) rem(ans_xy[i], sum_yx[j_min]);
        }
        sum_xy[i] = sum_xy[i - 1];
        add(sum_xy[i], ans_xy[i]);

        //cerr << ans_xx[i] << ' ' << ans_xy[i] << ' ' << ans_yx[i] << ' ' << ans_yy[i] << '\n';
    }
    ll rez = (ans_xx.back() + ans_xy.back() + ans_yx.back() + ans_yy.back()) % MOD;
    forn(i, 0, 2) {
        rez = rez * ((MOD + 1) / 2) % MOD;
    }
    cout << rez << '\n';
}


Measured memory_bytes: 8192