### Separate

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define mod 1000000007
#define N 2010
int fx[N][N], fy[N][N], n;
ll a[N], A, B;
int main() {
a[0] = -4223372036854775807ll;
fx[1][0] = fy[1][0] = 1;
scanf("%d%lld%lld", &n, &A, &B);
for (int i = 1; i <= n; i++) scanf("%lld", a + i);
sort(a + 1, a + n + 1);
for (int i = 1; i < n; i++) {
if (a[i + 1] - a[i] >= A)
for (int j = 0; j < i; j++) fx[i + 1][j] = fx[i][j];
if (a[i + 1] - a[i] >= B)
for (int j = 0; j < i; j++) fy[i + 1][j] = fy[i][j];
for (int j = 0; j < i; j++) {
if (a[i + 1] - a[j] >= B)
fy[i + 1][i] = (fy[i + 1][i] + fx[i][j]) % mod;
if (a[i + 1] - a[j] >= A)
fx[i + 1][i] = (fx[i + 1][i] + fy[i][j]) % mod;
}
}
int ans = 0;
for (int i = 0; i < n; i++) ans = (ans + (fx[n][i] + fy[n][i]) % mod) % mod;
printf("%d\n", ans);
return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define N 100010
#define mod 1000000007
ll a[N], A, B;
int tree[N * 4], f[N];
int t, n, m, ans;
void change(int p, int l, int r, int a, int b) {
if (l == r) {
(tree[p] += b) %= mod;
return;
}
int mid = (l + r) / 2;
if (a <= mid)
change(p * 2, l, mid, a, b);
else
change(p * 2 + 1, mid + 1, r, a, b);
tree[p] = (tree[p * 2] + tree[p * 2 + 1]) % mod;
}
int query(int p, int l, int r, int a, int b) {
if (a > b) return 0;
if (l == a && r == b) return tree[p];
int mid = (l + r) / 2;
if (b <= mid)
return query(p * 2, l, mid, a, b);
if (a > mid)
return query(p * 2 + 1, mid + 1, r, a, b);
return (query(p * 2, l, mid, a, mid) + query(p * 2 + 1, mid + 1, r, mid + 1, b)) % mod;
}
int main() {
scanf("%d%lld%lld", &n, &A, &B);
if (A < B) swap(A, B);
for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
sort(a + 1, a + n + 1);
a[0] = -A, a[n + 1] = a[n] + A, f[0] = 1;
change(1, 0, n, 0, f[0]);
int l = 0, r = 0;
for (int i = 1; i <= n + 1; i++) {
while (a[i] - a[r + 1] >= A) r++;
if (i >= 2 && a[i - 1] - a[i - 2] < B) l = i - 2;
if (a[i] - a[i - 1] >= A) f[i] = f[i - 1];
(f[i] += query(1, 0, n, l, min(i - 2, r))) %= mod;
if (i <= n && a[i + 1] - a[i - 1] >= B) change(1, 0, n, i, f[i]);
}
ll ans = (f[n + 1] + mod) % mod;
printf("%lld\n", ans);
}

#include <bits/stdc++.h>
#define ll long long
using namespace std;
#define N 100010
#define mod 1000000007
int n, f[N], g[N];
ll a[N], A, B, ans;
int main() {
scanf("%d%lld%lld", &n, &A, &B);
if (A > B) swap(A, B);
for (int i = 1; i <= n; i++) scanf("%lld", &a[i]);
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;
}
printf("%lld\n", ans);
return 0;
}