#include <cstdio>
#include <cstring>
#define MAXN 100010
#define LL long long

const LL P=1000000007;

int n;
LL L1,L2,d[MAXN];
int pre1[MAXN],pre2[MAXN];
LL f1[MAXN],sf1[MAXN],f2[MAXN],sf2[MAXN];

void pre_gao(){
	pre1[1]=pre2[1]=1;
	pre1[n]=pre2[n]=n;
	for(int i=2;i<n;i++){
		int temp=pre1[i-1];
		while(temp<i && d[i+1]-d[temp]>=L2) temp++;
		pre1[i]=temp;
	}
	for(int i=2;i<n;i++){
		int temp=pre2[i-1];
		while(temp<i && d[i+1]-d[temp]>=L1) temp++;
		pre2[i]=temp;
	}
}

void gao(){
	f1[0]=sf1[0]=f2[0]=sf2[0]=1;
	int lim1=1,lim2=1;
	for(int i=1;i<=n;i++){
		if(i>1 && d[i]-d[i-1]<L1) lim1=i;
		if(i>1 && d[i]-d[i-1]<L2) lim2=i;
		if(lim1<=pre1[i])
			f1[i]=(sf2[pre1[i]-1]-(lim1>1?sf2[lim1-2]:0)+P)%P;
		if(lim2<=pre2[i])
			f2[i]=(sf1[pre2[i]-1]-(lim2>1?sf1[lim2-2]:0)+P)%P;
		sf1[i]=(sf1[i-1]+f1[i])%P;
		sf2[i]=(sf2[i-1]+f2[i])%P;
	}
}

int main(){
#ifdef DEBUG
	freopen("C.in","r",stdin);
#endif
	scanf("%d%lld%lld",&n,&L1,&L2);
	for(int i=1;i<=n;i++) scanf("%lld",d+i);
	pre_gao();
	gao();
	printf("%lld\n",(f1[n]+f2[n])%P);
	return 0;
}
