#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;

typedef long long LL;

const int N=100005;
const int MOD=1000000007;

int n,f[N],g[N];
LL a,b,s[N];

int main()
{
    scanf("%d%lld%lld",&n,&a,&b);
    if (a>b) swap(a,b);
    for (int i=1;i<=n;i++) scanf("%lld",&s[i]);
    sort(s+1,s+n+1);
    for (int i=3;i<=n;i++) if (s[i]-s[i-2]<a) {puts("0");return 0;}
    f[0]=g[0]=1;int p=0,lim=0;
    for (int i=1;i<=n;i++)
    {
        while (p<i&&s[i]-s[p+1]>=b) p++;
        if (lim<=p) f[i]=(g[p]+MOD-(lim?g[lim-1]:0))%MOD;
        g[i]=(g[i-1]+f[i])%MOD;
        if (i>1&&s[i]-s[i-1]<a) lim=i-1;
    }
    int ans=0;
    for (int i=n;i>=0;i--)
    {
        (ans+=f[i])%=MOD;
        if (i<n&&s[i+1]-s[i]<a) break;
    }
    printf("%d",ans);
    return 0;
}