#include <bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
// #include <boost/multiprecision/cpp_int.hpp> 

#define gc getchar//_unlocked
#define pc putchar//_unlocked
#define ll long long
#define ld long double
#define pb push_back
#define mp make_pair
#define pp pair<int,int>
#define ppl pair<ll,ll>
#define bigint boost::multiprecision::cpp_int
#define finp ios_base::sync_with_stdio(0);cin.tie(0);
#define bc __builtin_popcountll
#define afor(i,a,b) for(int i=a;i<=b;++i)
#define bfor(i,a,b) for(int i=a;i>=b;--i)
#define vi vector<int>
#define vpp vector<pp>
#define vll vector<ll>

using namespace std;
using namespace __gnu_pbds;

char putnb[20];
void putn(ll n) {if(!n)pc('0');if(n<0)pc('-'),n=0-n;int pi=0;while(n)putnb[pi++]=(n%10)+'0',n/=10;while(pi)pc(putnb[--pi]);}
void sci(int *x) {register char c = gc();*x = 0;for(; (c<48)||(c>57);c = gc());for(; (c>47)&&(c<58);c = gc())*x = (int)((((*x)<<1) + ((*x)<<3)) + c - 48);}
void scll(ll *x)  {register char c = gc();*x = 0;for(; (c<48)||(c>57);c = gc());for(; (c>47)&&(c<58);c = gc())*x =  (ll)((((*x)<<1) + ((*x)<<3)) + c - 48);}
ll fp(ll a,ll b,ll c) {if(b==0)return 1%c; if(b==1)return a%c; ll ret=fp(a,b/2,c); ret=(ret*ret)%c; if(b&1)ret=(ret*a)%c; return ret;}

const ll mod=1e9 +7;
const ll mod2=1999999973;
const ll inf=1e18;
const int infs=1e9 + 1000;
const int N=100000;
const long double PI = acos(-1);

template <typename T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

ll n;
ll A,B;
ll S[N+5];

ll dpa[N+5];
ll dpb[N+5];
ll sufa[N+5];
ll sufb[N+5];


ll nexA[N+5];
ll nexB[N+5];
ll nexA2[N+5];
ll nexB2[N+5];

ll ans;

int main()
{
  finp;
  cin>>n>>A>>B;
  S[n] = inf;
  S[0] = 0 - inf;

  afor(i,1,n)
  {
    cin>>S[i];
  }

  nexA[n] = n;
  nexB[n] = n;
  nexB2[n] = n+1;
  nexA2[n] = n+1;

  bfor(i,n-1,0)
  {
    ll low = i+1;
    ll high = n+1;
    while(low < high)
    {
      if(low+1 == high)
      {
        if(S[low]-S[i] < A)low = high;
        break;
      }
      ll mid = (low + high)/2;
      if(S[mid]-S[i] < A)low = mid+1;
      else high = mid;
    }
    nexA2[i] = low;
  }

  bfor(i,n-1,0)
  {
    ll low = i+1;
    ll high = n+1;
    while(low < high)
    {
      if(low+1 == high)
      {
        if(S[low]-S[i] < B)low = high;
        break;
      }
      ll mid = (low + high)/2;
      if(S[mid]-S[i] < B)low = mid+1;
      else high = mid;
    }
    nexB2[i] = low;
  }

  bfor(i,n-1,0)
  {
    if(S[i+1]-S[i] >= B)nexB[i] = nexB[i+1];
    else nexB[i] = i;

    if(S[i+1]-S[i] >= A)nexA[i] = nexA[i+1];
    else nexA[i] = i;
  }

  dpb[n] = sufb[n] = 1;

  if(S[n]-S[n-1] >= A)dpa[n] = 1;


  bfor(i,n - 1,1)
  {

    if(S[i]-S[i-1] >= A)
    {
      ll low = nexA2[i];
      ll high = min(nexB[i+1] + 1 , n);
      if(high >= low)
      {
        if(low==i+1)
        {
          dpa[i]+= dpa[i+1];
          dpa[i]%= mod;
          low++;
        }
      }

      if(high >= low)
      {
        dpa[i]+= sufb[low] + mod - sufb[high+1];
        dpa[i]%= mod;
      }

     
      if(nexB[i+1] == n)dpa[i]++;
      dpa[i]%= mod;
    } 

     ll pos = max((ll)i , nexB2[i-1] - 1);

      if(pos <= nexA[i])
      {
        if(pos == i)
        {
          ll low = nexA2[i];
          ll high = min(nexB[i+1] + 1 , n);

           if(high >= low)
            {
              if(low==i+1)
                {
                dpb[i]+= dpa[i+1];
                dpb[i]%= mod;
                low++;
                }
            }

          if(high >= low)
          {
              dpb[i]+= sufb[low] + mod - sufb[high+1];
              dpb[i]%= mod;
          }

          if(nexB[i+1] == n)dpb[i]++;
          dpb[i]%= mod;
        }
        else dpb[i]+= dpa[pos];
      }

    sufb[i] = sufb[i+1] + dpb[i];
    sufb[i]%= mod;
  }


  ans = sufb[1] + mod - sufb[nexB[1] + 2];
  ans%= mod;

  if(nexB[1] == n)ans++;
  ans%= mod;

  cout<<ans;
  
return 0;
}

Measured memory_bytes: 6528