#include<cstdio>
using namespace std;
const int mod=1e9+7;
long long x[1000005],dp1[1000005],dp2[1000005];
int main(){
	int n;
	long long A,B;
	scanf("%d%lld%lld",&n,&A,&B);
	for (int i=1; i<=n; i++) scanf("%lld",&x[i]);
	dp1[0]=dp2[0]=1;
	int k1=0,k2=0,k3=0,k4=0;
	for (int i=2; i<=n; i++){
		while (k1+2<i && x[i]-x[k1+1]>=A) k1++;
		while (k2+2<i && x[i]-x[k2+1]>=B) k2++;
		int sum1=dp1[k2],sum2=dp2[k1];
		dp1[i-1]=sum2;
		dp2[i-1]=sum1;
		if (x[i]-x[i-1]<A){
			while (k3<i-1) {
				dp1[k3]=0;
				k3++;
			}
		}
		else (dp1[i-1]+=dp1[i-2])%=mod;
		if (x[i]-x[i-1]<B){
			while (k4<i-1){
				dp2[k4]=0;
				k4++;
			}
		}
		else (dp2[i-1]+=dp2[i-2])%=mod;
	}
	int ans=0;
	(ans+=dp1[n-1])%=mod,(ans+=dp2[n-1])%=mod;
	printf("%d\n",ans);
	return 0;
}