// g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<unordered_map>
#include<utility>
#include<cmath>
#include<random>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#include<typeinfo>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define FOR(i,a) for(auto i:a)
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define show1d(v) rep(_,v.size())cout<<" "<<v[_];cout<<endl;
#define show2d(v) rep(_,v.size()){rep(__,v[_].size())cout<<" "<<v[_][__];cout<<endl;}cout<<endl;
using namespace std;
//kaewasuretyuui
typedef long long ll;
//#define int ll
typedef ll Def;
typedef pair<Def,Def> pii;
typedef vector<Def> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<Def,pii> pip;
typedef vector<pip>vip;
// #define mt make_tuple
// typedef tuple<int,int,int> tp;
// typedef vector<tp> vt;
template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}
template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}
//template<class C>constexpr int size(const C &c){return (int)c.size();}
//template<class T,size_t N> constexpr int size(const T (&xs)[N])noexcept{return (int)N;}
const double PI=acos(-1);
const double EPS=1e-9;
Def inf = sizeof(Def) == sizeof(long long) ? 2e18+10 : 1e9+10;
int dx[]={0,1,0,-1,1,1,-1,-1};
int dy[]={1,0,-1,0,1,-1,1,-1};//RDLU
typedef int SegT;
const SegT defvalue=0;
ll MOD=1000000007;
class SegTree{
	private:
		vector<SegT>val;
		int n;
		SegT combine(SegT a,SegT b){return (a+b)%MOD;}
	public:
		SegTree(int size){
			n=1;
			while(n<size)n<<=1;
			val=vector<SegT>(2*n,defvalue);
		}
		SegTree(const vector<SegT> &in){
			n=1;
			while(n<in.size())n<<=1;
			val=vector<SegT>(2*n,defvalue);
			for(int i=n-1+in.size()-1;i>=0;i--){
				if(n-1<=i)val[i]=in[i-(n-1)];
				else val[i]=combine(val[i*2+1],val[i*2+2]);
			}
		}
		void update(int i,SegT a){
			i+=n-1;
			val[i]=a;
			while(i>0){
				i=(i-1)/2;
				val[i]=combine(val[i*2+1],val[i*2+2]);
			}
		}
		SegT query(int a,int b,int k=0,int l=0,int r=-1){//[a,b)
			if(r==-1)r=n;
			if(r<=a||b<=l)return defvalue;
			if(a<=l&&r<=b)return val[k];
			else return combine(query(a,b,k*2+1,l,(l+r)/2),query(a,b,k*2+2,(l+r)/2,r));
		}
		void tmp(){
			rep(i,val.size())cout<<" "<<val[i];cout<<endl;
		}
};
int main(){
	ll n,a,b;
	cin>>n>>a>>b;
	vi in(n+1);
	in[n]=inf;
	rep(i,n)cin>>in[i];
	
	vvi d(2,vi(n));
	rep(i,n){
		if(in[i+1]-in[i]<a)d[0][i]=1;
		if(in[i+1]-in[i]<b)d[1][i]=1;
	}
	vvi nd(2,vi(n+1));
	rep(i,2){
		int t=0;
		rep(j,n+1){
			nd[i][j]=t;
			if(j-n&&d[i][j])t=j+1;
		}	
	}
	d=nd;
	
	SegTree st1(n+1),st2(n+1);
	st1.update(0,1);
	st2.update(0,1);
	
	loop(i,1,n+1){
		int r=upper_bound(all(in),in[i]-a)-in.begin();
		if(r!=i)r++;
		int l=d[1][i-1];
		st1.update(i,st2.query(l,r));
//		cout<<l<<" "<<r<<" "<<st2.query(l,r)<<endl;
		r=upper_bound(all(in),in[i]-b)-in.begin();
		if(r!=i)r++;
		l=d[0][i-1];
		st2.update(i,st1.query(l,r));
//		cout<<l<<" "<<r<<" "<<st1.query(l,r)<<endl;
	}
	cout<<(st1.query(n,n+1)+st2.query(n,n+1))%MOD<<endl;
	
}
// 3 7
// 1 3 6 9 12
// 1 1 1 0 1  2
// 1 1 0 1 2  3







Measured memory_bytes: 6236