/* by Natsu Kinmoe */
#include <bits/stdc++.h>
using namespace std;
#define SZ(x)               ((int)(x).size())
#define all(x)              (x).begin(), (x).end()
#define loop(i, n)          for(int i = 0; i < (n); i++)
#define cont(i, n)          for(int i = 1; i <= (n); i++)
#define circ(i, a, b)       for(int i = (a); i <= (b); i++)
#define range(i, a, b, c)   for(int i = (a); ((c) > 0 ? i <= (b) : i >= (b)); i += (c))
#define foreach(it, v)      for(__typeof((v).begin()) it = (v).begin(); it != (v).end(); it++)
#define y0          y0O0OO00OO0OO0OO0OOO00OO0OO0O0O000OO0
#define y1          y1II11II11III11I1III11II111IIII1II1I1
#define pub         push_back
#define pob         pop_back
#define mak         make_pair
typedef long long   ll;
typedef long double lf;
const int   Inf = 0x3f3f3f3f;
const ll    INF = 0x3f3f3f3f3f3f3f3fll;
/* Source code starts here */

template<int jt> struct ModularInt {
	int x;
	ModularInt(int v = 0, bool should = 0) {x = v; if(should) {x %= jt; if(x < 0) x += jt;}}
	ModularInt(ll v) {x = v % jt; if(x < 0) x += jt;}
	operator int&() {return x;}
	friend inline ModularInt &operator+=(ModularInt &a, const ModularInt &b) {
		a.x += b.x;
		if(a.x >= jt) a.x -= jt;
		return a;
	}
	friend inline ModularInt operator+(ModularInt a, const ModularInt &b) {return a += b;}
	friend inline ModularInt &operator++(ModularInt &a) {return a += 1;}
	friend inline ModularInt &operator-=(ModularInt &a, const ModularInt &b) {
		a.x -= b.x;
		if(a.x < 0) a.x += jt;
		return a;
	}
	friend inline ModularInt operator-(ModularInt a, const ModularInt &b) {return a -= b;}
	friend inline ModularInt &operator--(ModularInt &a) {return a -= 1;}
	friend inline ModularInt &operator*=(ModularInt &a, const ModularInt &b) {
		a.x = 1ll * a.x * b.x % jt;
		return a;
	}
	friend inline ModularInt operator*(ModularInt a, const ModularInt &b) {return a *= b;}
	friend inline ModularInt ksmii(ModularInt a, int b) {
		if(!b) return 1;
		ModularInt x = ksmii(a, b >> 1);
		x *= x; if(b & 1) x *= a; return x;
	}
	friend inline ModularInt inv(const ModularInt &a) {
		return ksmii(a, jt - 2);
	}
	friend inline ModularInt operator/(const ModularInt &a, const ModularInt &b) {return a * inv(b);}
	friend inline ModularInt operator/=(ModularInt &a, const ModularInt &b) {return a = a / b;}
};
const int jt = 1000000007;
typedef ModularInt<jt> mint;


int n;
ll s[1 << 17], a, b;
int al[1 << 17], bl[1 << 17];

struct Segtree {
	mint dt[1 << 19];
	bool tag[1 << 19];
	void add(int to, mint x, int now = 1, int nl = 0, int nr = n) {
		if(tag[now]) {
			dt[now << 1] = dt[now << 1 | 1] = 0; tag[now] = 0;
			tag[now << 1] = tag[now << 1 | 1] = 1;
		}
		if(nl == nr) return void(dt[now] += x);
		int m = (nl + nr) >> 1;
		if(m >= to) add(to, x, now << 1, nl, m);
		else add(to, x, now << 1 | 1, m + 1, nr);
		dt[now] = dt[now << 1] + dt[now << 1 | 1];
	}
	mint sum(int l, int r, int now = 1, int nl = 0, int nr = n) {
		if(tag[now]) {
			dt[now << 1] = dt[now << 1 | 1] = 0; tag[now] = 0;
			tag[now << 1] = tag[now << 1 | 1] = 1;
		}
		if(nl >= l && nr <= r) return dt[now];
		if(nl > r || nr < l) return 0;
		int m = (nl + nr) >> 1;
		return sum(l, r, now << 1, nl, m) + sum(l, r, now << 1 | 1, m + 1, nr);
	}
} sega, segb;

int main() {
	scanf("%d%lld%lld", &n, &a, &b);
	cont(i, n) scanf("%lld", s + i);
	int l = 1;
	cont(i, n) {
		while(s[i] - s[l] >= a) l++;
		al[i] = l;
	}
	l = 1;
	cont(i, n) {
		while(s[i] - s[l] >= b) l++;
		bl[i] = l;
	}
	sega.add(0, 1); segb.add(0, 1);
	cont(i, n - 1) {
		mint ai = segb.sum(0, al[i + 1] - 1), bi = sega.sum(0, bl[i + 1] - 1);
		if(s[i + 1] - s[i] < a) {sega.tag[1] = 1; sega.dt[1] = 0;}
		if(s[i + 1] - s[i] < b) {segb.tag[1] = 1; segb.dt[1] = 0;}
		sega.add(i, ai); segb.add(i, bi);
	}
	printf("%d\n", int(sega.sum(0, n) + segb.sum(0, n)));
	return 0;
}


Measured memory_bytes: 10516