#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <queue>
#include <vector>
#include <bitset>
#include <string>
#include <cmath>
#include <set>
#include <map>
#define Rep(i, x, y) for (int i = x; i <= y; i ++)
#define Dwn(i, x, y) for (int i = x; i >= y; i --)
#define RepE(i, x) for (int i = pos[x]; i; i = g[i].nex)
#define ev g[i].y
using namespace std;
typedef long long ll;
typedef double db;
const int N = 100010;
const int mod = 1000000007;
int n, t;
ll A, B, a[N], k, f[N];
int main()
{
	scanf ("%d%lld%lld", &n, &A, &B);
	if (A > B) swap(A, B);
	Rep(i, 1, n) scanf ("%lld", &a[i]);
	a[n + 1] = a[n] + B;
	n ++;
	t = 1, k = 1;
	Rep(i, 1, n) {
		if (i > 2 && a[i] - a[i - 2] < A) break ;
		while (a[i] - a[t] >= B) (k += f[t]) %= mod, t ++;
		f[i] = k;
		if (i > 1 && a[i] - a[i - 1] < A) t = i - 1, k = 0;
	}
	printf("%lld\n", f[n]);

	return 0;
}