#include <iostream>
#include <vector>
#include <stdio.h>
#include <algorithm>

using namespace std;
#define DIV 1000000007
#define INF 1000000000000000000LL
typedef long long ll;


int N;
ll A, B;
vector<ll> S;
int M;

struct SEG{
	SEG(int l, int r, ll sum, bool lazy) : l(l), r(r), sum(sum), lazy(lazy) {}
	int l, r;
	ll sum;
	bool lazy;
};

vector<SEG> seg1, seg2;

void init(){
	seg1.push_back({-1, -1, 0, 0});
	seg2.push_back({-1, -1, 0, 0});
}

void update1(int idx, int s, int e, int x, ll y){
	if(seg1[idx].lazy){
		if(seg1[idx].l!=-1){
			seg1[seg1[idx].l].sum = 0; seg1[seg1[idx].l].lazy = true;
		}if(seg1[idx].r!=-1){
			seg1[seg1[idx].r].sum = 0; seg1[seg1[idx].r].lazy = true;
		}
		seg1[idx].lazy = false;
	}
	seg1[idx].sum=(seg1[idx].sum+y)%DIV;
	if(s==e)	return;
	if(x<=(s+e)/2){
		if(seg1[idx].l==-1){
			seg1[idx].l = seg1.size(); seg1.push_back({-1, -1, 0, 0});
		}update1(seg1[idx].l, s, (s+e)/2, x, y);
	}else{
		if(seg1[idx].r==-1){
			seg1[idx].r = seg1.size(); seg1.push_back({-1, -1, 0, 0});
		}update1(seg1[idx].r, (s+e)/2+1, e, x, y);
	}
}

void update2(int idx, int s, int e, int x, ll y){
	if(seg2[idx].lazy){
		if(seg2[idx].l!=-1){
			seg2[seg2[idx].l].sum = 0; seg2[seg2[idx].l].lazy = true;
		}if(seg2[idx].r!=-1){
			seg2[seg2[idx].r].sum = 0; seg2[seg2[idx].r].lazy = true;
		}
		seg2[idx].lazy = false;
	}
	seg2[idx].sum=(seg2[idx].sum+y)%DIV;
	if(s==e)	return;
	if(x<=(s+e)/2){
		if(seg2[idx].l==-1){
			seg2[idx].l = seg2.size(); seg2.push_back({-1, -1, 0, 0});
		}update2(seg2[idx].l, s, (s+e)/2, x, y);
	}else{
		if(seg2[idx].r==-1){
			seg2[idx].r = seg2.size(); seg2.push_back({-1, -1, 0, 0});
		}update2(seg2[idx].r, (s+e)/2+1, e, x, y);
	}
}

void lazy1(int idx, int s, int e, int x, int y){
	if(idx==-1)	return;
	if(seg1[idx].lazy){
		if(seg1[idx].l!=-1){
			seg1[seg1[idx].l].sum = 0; seg1[seg1[idx].l].lazy = true;
		}if(seg1[idx].r!=-1){
			seg1[seg1[idx].r].sum = 0; seg1[seg1[idx].r].lazy = true;
		}
		seg1[idx].lazy = false;
	}
	if(x<=s && e<=y){
		seg1[idx].lazy = true; seg1[idx].sum = 0;
		return;
	}
	if(x>e || y<s)	return;
	lazy1(seg1[idx].l, s, (s+e)/2, x, y);
	lazy1(seg1[idx].r, (s+e)/2+1, e, x, y);
	seg1[idx].sum = 0;
	if(seg1[idx].l!=-1)	seg1[idx].sum+=seg1[seg1[idx].l].sum;
	if(seg1[idx].r!=-1)	seg1[idx].sum+=seg1[seg1[idx].r].sum;
}

void lazy2(int idx, int s, int e, int x, int y){
	if(idx==-1)	return;
	if(seg2[idx].lazy){
		if(seg2[idx].l!=-1){
			seg2[seg2[idx].l].sum = 0; seg2[seg2[idx].l].lazy = true;
		}if(seg2[idx].r!=-1){
			seg2[seg2[idx].r].sum = 0; seg2[seg2[idx].r].lazy = true;
		}
		seg2[idx].lazy = false;
	}
	if(x<=s && e<=y){
		seg2[idx].lazy = true; seg2[idx].sum = 0;
		return;
	}
	if(x>e || y<s)	return;
	lazy2(seg2[idx].l, s, (s+e)/2, x, y);
	lazy2(seg2[idx].r, (s+e)/2+1, e, x, y);
	seg2[idx].sum = 0;
	if(seg2[idx].l!=-1)	seg2[idx].sum+=seg2[seg2[idx].l].sum;
	if(seg2[idx].r!=-1) seg2[idx].sum+=seg2[seg2[idx].r].sum;
}


ll sum1(int idx, int s, int e, int x, int y){
	if(idx==-1)	return 0;
	if(seg1[idx].lazy){
		if(seg1[idx].l!=-1){
			seg1[seg1[idx].l].sum = 0; seg1[seg1[idx].l].lazy = true;
		}if(seg1[idx].r!=-1){
			seg1[seg1[idx].r].sum = 0; seg1[seg1[idx].r].lazy = true;
		}
		seg1[idx].lazy = false;
	}
	if(x<=s && e<=y)	return seg1[idx].sum;
	if(x>e || y<s)	return 0;
	return (sum1(seg1[idx].l, s, (s+e)/2, x, y) + sum1(seg1[idx].r, (s+e)/2+1, e, x, y))%DIV;
}

ll sum2(int idx, int s, int e, int x, int y){
	if(idx==-1)	return 0;
	if(seg2[idx].lazy){
		if(seg2[idx].l!=-1){
			seg2[seg2[idx].l].sum = 0; seg2[seg2[idx].l].lazy = true;
		}if(seg2[idx].r!=-1){
			seg2[seg2[idx].r].sum = 0; seg2[seg2[idx].r].lazy = true;
		}
		seg2[idx].lazy = false;
	}	
	if(x<=s && e<=y)	return seg2[idx].sum;
	if(x>e || y<s)	return 0;
	return (sum2(seg2[idx].l, s, (s+e)/2, x, y) + sum2(seg2[idx].r, (s+e)/2+1, e, x, y))%DIV;
}

int main(){
	init();
	scanf("%d%lld%lld", &N, &A, &B);
	S.push_back(-INF);
	for(int i=0; i<N; i++){
		ll x; scanf("%lld", &x); S.push_back(x);
	}
	for(int i=1; i<=N; i++){
		if(i==1){
			update1(0, 0, N-1, 0, 1);
			update2(0, 0, N-1, 0, 1);
		}else{
			int s=0, e = i-2, m;
			while(s<e){
				m = (s+e)/2+1;
				if(S[i]-S[m]>=B)	s = m;
				else	e = m-1;
			}
			if(S[i]-S[s]>=B)	update2(0, 0, N-1, i-1, sum1(0, 0, N-1, 0, s));
			s = 0, e = i-2;
			while(s<e){
				m = (s+e)/2+1;
				if(S[i]-S[m]>=A)	s = m;
				else	e = m-1;
			}
			if(S[i]-S[s]>=A)	update1(0, 0, N-1, i-1, sum2(0, 0, N-1, 0, s));
			if(S[i]-S[i-1]<A)	lazy1(0, 0, N-1, 0, i-2);
			if(S[i]-S[i-1]<B)	lazy2(0, 0, N-1, 0, i-2);
		}
		/*printf("%d\n", i);
		for(int j=0; j<N; j++){
			printf("%lld ", sum1(0, 0, N-1, j, j));
		}printf("\n");
		for(int j=0; j<N; j++){
			printf("%lld ", sum2(0, 0, N-1, j, j));
		}printf("\n");*/
	}
	printf("%lld",	(sum1(0, 0, N-1, 0, N-1)+sum2(0, 0, N-1, 0, N-1))%DIV);
	return 0;
}

Measured memory_bytes: 14564