#include <bits/stdc++.h>

#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)

#define _rrep(i,n) _rrange(i,n,0)
#define _rrange(i,a,b) for(int i=int(a)-1;i>=int(b);--i)
#define rrep(...) _overload(__VA_ARGS__,_rrange,_rrep,)(__VA_ARGS__)

#define _all(arg) begin(arg),end(arg)
#define uniq(arg) sort(_all(arg)),(arg).erase(unique(_all(arg)),end(arg))
#define getidx(ary,key) lower_bound(_all(ary),key)-begin(ary)
#define clr(a,b) memset((a),(b),sizeof(a))
#define bit(n) (1LL<<(n))
#define popcount(n) (__builtin_popcountll(n))

using namespace std;

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0;}
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0;}

using ll=long long;
using R=long double;
const R EPS=1e-9L; // [-1000,1000]->EPS=1e-8 [-10000,10000]->EPS=1e-7
inline int sgn(const R& r){return(r > EPS)-(r < -EPS);}
inline R sq(R x){return sqrt(max(x,0.0L));}

const int dx[8]={1,0,-1,0,1,-1,-1,1};
const int dy[8]={0,1,0,-1,1,1,-1,-1};

#define error(args...) { vector<string> _debug = split(#args, ',');err(begin(_debug), args);}

vector<string> split(const string& s, char c){
	vector<string> v;stringstream ss(s);string x;
	while (getline(ss, x, c)) v.emplace_back(x);
	return move(v);
}

void err(vector<string>::iterator it) {cerr << endl;}
template<typename T, typename... Args> void err(vector<string>::iterator it, T a,Args... args){
	cerr << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << " ",err(++it, args...);
}

// Problem Specific Parameter:
ll n,a,b;
const ll inf=1LL<<60;
const int nmax=100010;
ll s[nmax];

const ll mod=1000000007LL;

struct Binary_indexed_tree{
	using T=ll;
	vector<T> data;
	int n;

	Binary_indexed_tree(int _n):n(_n){data.assign(n+1,0);}

	void update(int i,T x){
		for(i++;i<=n;i+=i&-i){
			data[i]=(data[i]+x)%mod;
		}
	}

	T query(int i){
		T ret=0LL;
		for(i++;i>0;i-=i&-i) ret=(ret+data[i])%mod;
		return ret;
	}
};


int main(void){
	cin >> n >> a >> b;

	s[0]=-inf;
	rep(i,1,n+1) cin >> s[i];

	Binary_indexed_tree X(n+2),Y(n+2);

	X.update(0,1LL),Y.update(0,1LL);
	int zx = 0, zy = 0;

	rep(i,2,n+1){
		/*
		rep(a,n) cerr << (a?" ":"") << X.query(a) - X.query(a-1);
		cerr << endl;
		rep(a,n) cerr << (a?" ":"") << Y.query(a) - Y.query(a-1);
		cerr << endl;
		*/

		bool rx = (s[i]-s[i-1]-a) < 0;
		bool ry = (s[i]-s[i-1]-b) < 0;
		 
		{
			const int j=upper_bound(s,s+i-1,s[i]-b)-s-1;
			const ll add = X.query(j);
			//error(i,"Y",j,add);
			Y.update(i-1,add);
		}

		{
			const int j=upper_bound(s,s+i-1,s[i]-a)-s-1;
			const ll add = Y.query(j);
			//error(i,"X",j,add);
			X.update(i-1,add);
		}

		if(rx){
			while(zx < i-1){
				const ll add = X.query(zx);
				X.update(zx,mod-add);
				zx++;
			}
		}

		if(ry){
			while(zy < i-1){
				const ll add = Y.query(zy);
				Y.update(zy,mod-add);
				zy++;
			}
		}
	}

	/*
	rep(a,n) cerr << (a?" ":"") << X.query(a) - X.query(a-1);
	cerr << endl;
	rep(a,n) cerr << (a?" ":"") << Y.query(a) - Y.query(a-1);
	cerr << endl;
	*/
	ll ans = (X.query(n)+Y.query(n))%mod;
	cout << ans << endl;

	return 0;
}

Measured memory_bytes: 2560