//============================================================================
// Author       : Sun YaoFeng
//============================================================================

//#pragma 	comment(linker, "/STACK:100240000,100240000")
//#include	<cstdio>
//#include	<cstdlib>
//#include	<cstring>
//#include	<algorithm>

#include	<bits/stdc++.h>

using	namespace	std;

#define DB		double
#define	lf		else if
#define I64		long long
#define	Rd()	(rand()<<15|rand())
#define For(i,a,b)	for(int i=a,lim=b;i<=lim;i++)
#define Rep(i,a,b)	for(int i=a,lim=b;i>=lim;i--)

#define	fi	first
#define se	second
#define MK	make_pair
#define PA	pair<int, int>

//#define	min(a,b)	((a)<(b)?(a):(b))
//#define	max(a,b)	((a)<(b)?(b):(a))

#define	CH	(ch=getchar())
int		IN()	{
		int x= 0, f= 0, ch;
		for	(; CH < '0' || ch > '9';)	f= (ch == '-');
		for	(; ch >= '0' && ch <= '9'; CH)	x= x*10 + ch -'0';
		return	f? -x : x;
}

#define n	100005
#define P	1000000007

int		N;

I64		X, Y, A[n];

namespace	F{
	int		sum[n << 2], Cov[n << 2];
	
	void	Cover(int u)	{
		Cov[u]= 1;
		sum[u]= 0;
	}
	
	void	Up(int u)	{
		sum[u]= (sum[u << 1] + sum[u << 1 | 1]) % P;
	}
	
	void	Down(int u)	{
		if	(Cov[u])	{
			Cover(u << 1);
			Cover(u << 1 | 1);
			Cov[u]= 0;
		}
	}
	
	void	Modify(int u, int l, int r, int x, int v)	{
		if	(l == r)	{
			sum[u]= (sum[u] + v) % P;	return;
		}
		
		int Mid= (l + r) >> 1;
		Down(u);
		
		if	(x <= Mid)	Modify(u << 1, l, Mid, x, v);
			else	Modify(u << 1 | 1, Mid+1, r, x, v);
		
		Up(u);
	}
	
	int		Query(int u, int l, int r, int x, int y)	{
		if	(x <= l && r <= y)	return	sum[u];
		
		int Mid= (l + r) >> 1;
		Down(u);
		
		if	(y <= Mid)	return	Query(u << 1, l, Mid, x, y);
		if	(x > Mid)	return	Query(u << 1 | 1, Mid+1, r, x, y);
		return	(Query(u << 1, l, Mid, x, y) + Query(u << 1 | 1, Mid+1, r, x, y)) % P;
	}
};

namespace	G{
	int		sum[n << 2], Cov[n << 2];
	
	void	Cover(int u)	{
		Cov[u]= 1;
		sum[u]= 0;
	}
	
	void	Up(int u)	{
		sum[u]= (sum[u << 1] + sum[u << 1 | 1]) % P;
	}
	
	void	Down(int u)	{
		if	(Cov[u])	{
			Cover(u << 1);
			Cover(u << 1 | 1);
			Cov[u]= 0;
		}
	}
	
	void	Modify(int u, int l, int r, int x, int v)	{
		if	(l == r)	{
			sum[u]= (sum[u] + v) % P;	return;
		}
		
		int Mid= (l + r) >> 1;
		Down(u);
		
		if	(x <= Mid)	Modify(u << 1, l, Mid, x, v);
			else	Modify(u << 1 | 1, Mid+1, r, x, v);
		
		Up(u);
	}
	
	int		Query(int u, int l, int r, int x, int y)	{
		if	(x <= l && r <= y)	return	sum[u];
		
		int Mid= (l + r) >> 1;
		Down(u);
		
		if	(y <= Mid)	return	Query(u << 1, l, Mid, x, y);
		if	(x > Mid)	return	Query(u << 1 | 1, Mid+1, r, x, y);
		return	(Query(u << 1, l, Mid, x, y) + Query(u << 1 | 1, Mid+1, r, x, y)) % P;
	}
};

int		main(int argc, char* argv[]){
		N= IN();
		scanf("%lld%lld", &X, &Y);
		
		For(i, 1, N)	scanf("%lld", &A[i]);
		A[0]= - (1ll << 60);
		
		F::Modify(1, 0, N, 0, 1);
		
		for (int i= 1, a= 0, b= 0; i <= N; i++)	{
			for (; A[i] - A[a+1] >= X; a++);
			for (; A[i] - A[b+1] >= Y; b++);
			
			int x= F::Query(1, 0, N, 0, b),
				y= G::Query(1, 0, N, 0, a);
			
			if	(A[i] - A[i-1] < X)	F::Cover(1);
			if	(A[i] - A[i-1] < Y)	G::Cover(1);
			
			G::Modify(1, 0, N, i-1, x);
			F::Modify(1, 0, N, i-1, y);
		}
		
		int	Ans= (F::Query(1, 0, N, 0, N) + G::Query(1, 0, N, 0, N)) % P;
		cout << Ans << endl;
		
		return	0;
}

Measured memory_bytes: 5120