#include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>

using namespace std;

const int M=1e9+7;
const int ML=100100;

long long s[ML];

int fx[ML],fy[ML];

int main()
{
	int n; long long dx,dy; cin>>n>>dx>>dy;
	
	for (int i=1; i<=n; i++) scanf("%lld",&s[i]);
	
	s[0]=s[1]-max(dx,dy); fx[0]=1; fy[0]=1;
	
	int sumx=0,sumy=0,px=0,py=0,zx=0,zy=0;
	
	for (int i=2; i<=n; i++)
	{
		//cout<<i<<endl;
		
		long long sx=s[i]-dx;
		long long sy=s[i]-dy;
		
		for ( ; s[px]<=sy && px<=n; px++) sumx=(sumx+fx[px])%M;
		for ( ; s[py]<=sx && py<=n; py++) sumy=(sumy+fy[py])%M;
		
		//i-1
		if (s[i]-s[i-1]<dx) fx[i-1]=sumy;
		               else fx[i-1]=(fx[i-1]+sumy)%M;
		
		if (s[i]-s[i-1]<dy) fy[i-1]=sumx;
		               else fy[i-1]=(fy[i-1]+sumx)%M;
		
		//0~i-2
		if (s[i]-s[i-1]<dx) sumx=0,px=zx=i-1;
		if (s[i]-s[i-1]<dy) sumy=0,py=zy=i-1;
		
		//ouput
		//for (int j=0; j<zx; j++) cout<<"0 ";
		//for (int j=zx; j<i; j++) cout<<fx[j]<<" ";cout<<endl;
		
		//for (int j=0; j<zy; j++) cout<<"0 ";
		//for (int j=zy; j<i; j++) cout<<fy[j]<<" ";cout<<endl;
	}
	
	int ans=0;
	
	for (int i=zx; i<=n; i++) ans=(ans+fx[i])%M;
	for (int i=zy; i<=n; i++) ans=(ans+fy[i])%M;
	
	cout<<ans;
	
	return 0;
}