#include <bits/stdc++.h>
#define ll long long
using namespace std;
ll getint() {
	ll i = 0, f = 1;
	char c;
	for (c = getchar(); (c != '-') && (c < '0' || c > '9'); c = getchar());
	if (c == '-') c = getchar(), f = -1;
	for (; c >= '0' && c <= '9'; c = getchar())
		i = (i << 3) + (i << 1) + c - '0';
	return i * f;
}
const int N = 100005, mod = 1e9 + 7;
int n, ans, f[N], g[N];
ll a[N], A, B;
int main() {
	n = getint(), A = getint(), B = getint();
	if (A > B) swap(A, B);
	for (int i = 1; i <= n; i++) a[i] = getint();
	sort(a + 1, a + n + 1);
	for (int i = 3; i <= n; i++)
		if (a[i] - a[i - 2] < A) {
			puts("0");
			return 0;
		}
	f[0] = g[0] = 1;
	int l = 0, r = 0;
	for (int i = 1; i <= n; i++) {
		while (r < i - 1 && a[i] - a[r + 1] >= B) ++r;
		if (l <= r) f[i] = (g[r] + mod - (l ? g[l - 1] : 0)) % mod;
		g[i] = (g[i - 1] + f[i]) % mod;
		if (i > 1 && a[i] - a[i - 1] < A) l = i - 1;
	}
	for (int i = n; i >= 0; i--) {
		ans = (ans + f[i]) % mod;
		if (i < n && a[i + 1] - a[i] < A) break;
	}
	cout << ans << '\n';
	return 0;
}