#include <cstdio>
#include <algorithm>
using namespace std;
 
#define iter(i, n) for (int i = 1; i <= n; ++i)
#define forw(i, a, b) for (int i = a; i <= b; ++i)
#define NR 101000
 
const int mod = 1000000007;
 
int n, f[NR], sum[NR], L[NR], R[NR];
long long a[NR], dA, dB;
 
int main() {
	scanf("%d%lld%lld", &n, &dA, &dB);
	if (dA > dB) swap(dA, dB);
	iter(i, n) scanf("%lld", &a[i]);
 
	int p = 0;
	forw(i, 2, n) {
		if (i > 2 && a[i] - a[i - 2] < dA) {
			printf("0\n");
			return 0;
		}
 
		L[i] = (a[i] - a[i - 1] >= dA) ? L[i - 1] : i - 1;
		for (; a[i] - a[p + 1] >= dB; ++p);
		R[i] = p;
	}
 
	f[0] = sum[0] = 1;
	L[1] = R[1] = 0;
 
	iter(i, n) {
		if (L[i-1] <= R[i]) f[i] = (sum[R[i]] - (L[i - 1] > 0 ? sum[L[i - 1] - 1] : 0) + mod) % mod;
		sum[i] = (sum[i - 1] + f[i]) % mod;
//printf("%d %d %d\n", f[i], L[i - 1], R[i]);
	}
 
	printf("%d\n", (sum[n] - (L[n] > 0 ? sum[L[n] - 1] : 0) + mod) % mod);
	return 0;
}