#include <algorithm>
#include <cstdio>
#define MOD 1000000007
typedef long long ll;
int dp[100005], sum[100005];
ll arr[100005];
int main()
{
	// freopen("AGC009-C.in", "r", stdin);
	int n;
	ll a, b;
	scanf("%d%lld%lld", &n, &a, &b);
	if (a > b)
		std::swap(a, b);
	arr[0] = -1e18;
	for (int i = 1; i <= n; i++)
	{
		scanf("%lld", arr + i);
		if (i >= 2 && arr[i] - arr[i - 2] < a)
		{
			puts("0");
			return 0;
		}
	}
	dp[0] = sum[1] = 1;
	int l = 0, r = 0;
	for (int i = 1; i <= n; i++)
	{
		while (arr[i] - arr[r] >= b)
			r++;
		dp[i] = (sum[r] - sum[l] + MOD) % MOD;
		sum[i + 1] = (sum[i] + dp[i]) % MOD;
		if (arr[i] - arr[i - 1] < a)
			l = r = i - 1;
	}
	printf("%d\n", (sum[n + 1] - sum[l] + MOD) % MOD);
	return 0;
}
