#include<bits/stdc++.h>
#include <array>
using namespace std;
using ULL = unsigned long long;
using UL = unsigned;
using LL = long long;
#define rep(i, n) for(UL i = 0; i < (n); i++)

struct Problem {

	static const ULL M = 1000000007;

	void Solve() {
		UL N; cin >> N;
		ULL A, B; cin >> A >> B;
		vector<ULL> S(N); rep(i, N) cin >> S[i];
		if (A > B) swap(A, B);
		vector<UL> P(N);
		{
			UL q = 0;
			rep(p, N) {
				while (q < S.size()) {
					if (S[p] - S[q] < B) break;
					q++;
				}
				P[p] = q;
			}
		}
		vector<ULL> dp(N + 1); dp[0] = 1;
		UL q = 0;
		rep(p, N) {
			dp[p + 1] += dp[P[p]];
			dp[p + 1] += dp[p];
			dp[p + 1] %= M;
			if (p != 0) if (S[p] - S[p - 1] < A) {
				dp[p + 1] += M - dp[p - 1]; dp[p + 1] %= M;
				dp[p] += M - dp[p - 1]; dp[p] %= M;
				for (; q <= p - 1; q++) dp[q] = 0;
			}
			if (p >= 2) if (S[p] - S[p - 2] < A) { cout << 0 << endl; return; }
		}
		cout << dp[N] << endl;
	}

	Problem();
};
int main() {
	unique_ptr<Problem> p(new Problem());
	p->Solve();
	return 0;
}
Problem::Problem() {
	cout << fixed << setprecision(10);
}
