#include <bits/stdc++.h>
#define SZ(x) ((int) (x).size())
using namespace std;

typedef long long i64;

const int MOD = (int) 1e9 + 7;

class SegmentTree {
public:
    SegmentTree(int sz):
        tree(4 * sz + 5, 0), lazy(4 * sz + 5), doLazy(4 * sz + 5, false),
        n(sz) {}
    
    void update(int pos, int val) {
        update(0, 0, n - 1, pos, pos, val);
    }
    void update(int left, int right, int val) {
        update(0, 0, n - 1, left, right, val);
    }
    int query(int left, int right) {
        if (left > right) {
            return 0;
        }
        return query(0, 0, n - 1, left, right);
    }
private:
    vector<int> tree, lazy;
    vector<bool> doLazy;
    int n;

    void split(int node, int left, int right) {
        if (doLazy[node]) {
            tree[node] = (int64_t) lazy[node] * (right - left + 1) % MOD;
            if (left < right) {
                doLazy[2 * node + 1] = doLazy[2 * node + 2] = true;
                lazy[2 * node + 1] = lazy[2 * node + 2] = lazy[node];
            }
            doLazy[node] = false;
        }
    }

    void update(int node, int left, int right, int lq, int rq, int val) {
        split(node, left, right);
        if (lq <= left && right <= rq) {
            doLazy[node] = true;
            lazy[node] = val;
        } else {
            int mid = (left + right) / 2;
            if (lq <= mid) {
                update(2 * node + 1, left, mid, lq, rq, val);
            }
            if (rq > mid) {
                update(2 * node + 2, mid + 1, right, lq, rq, val);
            }
            split(2 * node + 1, left, mid);
            split(2 * node + 2, mid + 1, right);
            tree[node] = (tree[2 * node + 1] + tree[2 * node + 2]) % MOD;
        }
    }

    int query(int node, int left, int right, int lq, int rq) {
        split(node, left, right);
        if (lq <= left && right <= rq) {
            return tree[node];
        } else {
            int mid = (left + right) / 2, ret = 0;
            if (lq <= mid) {
                ret = query(2 * node + 1, left, mid, lq, rq);
            }
            if (rq > mid) {
                ret += query(2 * node + 2, mid + 1, right, lq, rq);
                ret %= MOD;
            }
            return ret;
        }
    }
};

const int NMAX = 100005;

int64_t a[NMAX];
int64_t A, B;

int main() {
    #ifdef LOCAL_RUN
    freopen("task.in", "r", stdin);
    freopen("task.out", "w", stdout);
    //freopen("task.err", "w", stderr);
    #endif // ONLINE_JUDGE
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n;
    cin >> n >> A >> B;

    a[0] = -(1LL << 62);
    SegmentTree dp1(n + 1), dp2(n + 1);
    dp1.update(1, 1);
    dp2.update(1, 1);
    for (int i = 1, j1 = 0, j2 = 0; i <= n; ++i) {
        cin >> a[i];
        while (a[i] - a[j1 + 1] >= A) {
            j1++;
        }
        while (a[i] - a[j2 + 1] >= B) {
            j2++;
        }
        int cdp1 = dp2.query(1, j1 + 1);
        int cdp2 = dp1.query(1, j2 + 1);
        dp1.update(i, cdp1);
        dp2.update(i, cdp2);
        if (j1 < i - 1) {
            dp1.update(1, i - 1, 0);
        }
        if (j2 < i - 1) {
            dp2.update(1, i - 1, 0);
        }
    }
    int ans = (dp1.query(1, n) + dp2.query(1, n)) % MOD;
    cout << ans << '\n';
}


Measured memory_bytes: 7424