#include <cstdio>
using namespace std;
const int N=100005;
const int mod=1000000007;
int n,i,j,l,r;
int f[N],p[N];
long long s[N],a,b;
int main()
{
	scanf("%d",&n);
	scanf("%lld%lld",&a,&b);
	for (i=1;i<=n;i++)
		scanf("%lld",&s[i]);
	if (a>b)
		a^=b^=a^=b;
	for (i=3;i<=n;i++)
		if (s[i]-s[i-2]<a)
		{
			printf("%d\n",0);
			return 0;
		}
	f[0]=1;
	p[0]=1;
	for (i=1;i<=n;i++)
	{
		while (r<i-1&&s[i]-s[r+1]>=b)
			r++;
		if (l<=r)
			f[i]=(p[r]+mod-(l?p[l-1]:0))%mod;
		p[i]=(p[i-1]+f[i])%mod;
		if (i>1&&s[i]-s[i-1]<a)
			l=i-1;
	}
	for (i=n;i>=1;i--)
		if (i<n&&s[i+1]-s[i]<a)
			break;
	printf("%d\n",(p[n]+mod-(i?p[i-1]:0))%mod);
	return 0;
}