#include <bits/stdc++.h>
using namespace std;

#define _p(...) (void)printf(__VA_ARGS__)
#define forr(x,arr) for(auto&& x:arr)
#define _overload3(_1,_2,_3,name,...) name
#define _rep2(i,n) _rep3(i,0,n)
#define _rep3(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,_rep3,_rep2,)(__VA_ARGS__)
#define _rrep2(i,n) _rrep3(i,0,n)
#define _rrep3(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define rrep(...) _overload3(__VA_ARGS__,_rrep3,_rrep2,)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define bit(n) (1LL<<(n))
#define sz(x) ((int)(x).size())
#define fst first
#define snd second
using ll=long long;using pii=pair<int,int>;
using vb=vector<bool>;using vs=vector<string>;
using vi=vector<int>;using vvi=vector<vi>;using vvvi=vector<vvi>;
using vl=vector<ll>;using vvl=vector<vl>;using vvvl=vector<vvl>;
using vd=vector<double>;using vvd=vector<vd>;using vvvd=vector<vvd>;
using vpii=vector<pii>;using vvpii=vector<vpii>;using vvvpii=vector<vvpii>;
template<typename T>T read(){T t;cin>>t;return t;}
template<class T,class U>ostream&operator<<(ostream&o,const pair<T,U>&p){return o<<'('<<p.fst<<", "<<p.snd<<')';}
template<class T>ostream&operator<<(ostream&o,const vector<T>&t){o<<"{";rep(i,sz(t))o<<t[i]<<",";o<<"}";return o;}
#define out(args...){vector<string> a_r_g_s=__split(#args, ','); e_r_r(a_r_g_s.begin(), args); }
vector<string> __split(const string& s,char c){vector<string>v;stringstream ss(s);string x;while(getline(ss,x,c))v.emplace_back(x);return move(v);}
void e_r_r(vector<string>::iterator it) {}
template<typename T,typename... Args> void e_r_r(vector<string>::iterator it, T a, Args... args){if(*it==" 1"||*it=="1")cerr<<endl;else cerr<<it->substr((*it)[0]==' ',it->length())<<" = "<<a<<", ";e_r_r(++it, args...);}

const int mod = 1000000007;

template<int MOD>
struct Mint {
  int x;
  Mint() : x(0) {}
  Mint(int y) : x(y >= 0 ? y % MOD : MOD - (-y) % MOD) {}
  Mint(signed long long sll) : x(sll % MOD) { if (x < 0) x += MOD; }
  Mint &operator+=(const Mint &rhs){ if((x += rhs.x) >= MOD) x -= MOD; return *this; }
  Mint &operator-=(const Mint &rhs){ if((x += MOD - rhs.x) >= MOD) x -= MOD; return *this; }
  Mint &operator*=(const Mint &rhs){ x = 1LL*x*rhs.x % MOD; return *this; }
  Mint &operator/=(const Mint &rhs){ x = (1LL*x*rhs.inv().x) % MOD; return *this; }
  Mint operator-() const { return Mint(-x); }
  Mint operator+(const Mint &rhs) const { return Mint(*this) += rhs; }
  Mint operator-(const Mint &rhs) const { return Mint(*this) -= rhs; }
  Mint operator*(const Mint &rhs) const { return Mint(*this) *= rhs; }
  Mint operator/(const Mint &rhs) const { return Mint(*this) /= rhs; }
  bool operator<(const Mint &rhs) const { return x < rhs.x; }
  Mint inv() const {
    signed a = x, b = MOD, u = 1, v = 0, t;
    while(b){ t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); }
    return Mint(u);
  }
  Mint operator^(unsigned long long t) const {
    Mint e = *this, res = 1;
    for(; t; e *= e, t>>=1) if (t & 1) res *= e;
    return res;
  }
};
template<int MOD> ostream &operator<<(ostream &os, const Mint<MOD> &rhs) { return os << rhs.x; }
template<int MOD> istream &operator>>(istream &is, Mint<MOD> &rhs) { long long s; is >> s; rhs = Mint<MOD>(s); return is; };

using mint = Mint<mod>;
using vm=vector<mint>;using vvm=vector<vm>;using vvvm=vector<vvm>;

// accessible for range [0, n)
template <typename T> struct BinaryIndexedTree0 {
  const int N;
  T val[100001];

  BinaryIndexedTree0(int N) : N(N) {
    memset(val, 0, sizeof(val));
  }

  void clear() {
    memset(val, 0, sizeof(val));
  }

  // sum of [0, i)
  // v[0] + v[1] + ... + v[i-1]
  T sum(int i) {
    T s = 0;
    --i;
    if (i >= N) i = N - 1;
    for (; i >= 0; i = (i & (i + 1)) - 1) s += val[i];
    return s;
  }

  // sum of [l, r)
  // v[l] + v[l+1] + ... + v[r-1]
  T sum(int l, int r) {
    return sum(r) - sum(l);
  }

  // v[i] += x
  void add(int i, T x) {
    for (; i < N; i |= i + 1) val[i] += x;
  }

  // v[i] = x
  void set(int i, T x) {
    T c = sum(i, i + 1);
    add(i, x - c);
  }
};

void Main() {
  int n = read<int>();
  ll a = read<ll>();
  ll b = read<ll>();

  const ll inf = 1e18;

  vl S(n+1);
  rep(i, n) S[i+1] = read<ll>();
  S[0] = -inf;

  BinaryIndexedTree0<mint> ft1(n+10);
  BinaryIndexedTree0<mint> ft2(n+10);

  ft1.add(0, 1);
  ft2.add(0, 1);

  vi a1, a2;
  a1.push_back(0);
  a2.push_back(0);

  rep(i, 2, n+1) {
    //cout << "------" << endl;
    //rep(ii, i-1) _p("ft1[%d]:%d\n", ii, ft1.sum(ii, ii+1).x);
    //rep(ii, i-1) _p("ft2[%d]:%d\n", ii, ft2.sum(ii, ii+1).x);
    ll p = S[i-1];
    ll s = S[i];

    int nex1_idx = upper_bound(all(S), s - a) - S.begin();
    mint nex1 = ft2.sum(nex1_idx);

    int nex2_idx = upper_bound(all(S), s - b) - S.begin();
    mint nex2 = ft1.sum(nex2_idx);

    if (s - p < a) {
      forr(x, a1) ft1.set(x, 0);
      a1.clear();
    }
    if (s - p < b) {
      forr(x, a2) ft2.set(x, 0);
      a2.clear();
    }

    ft1.add(i-1, nex1);
    ft2.add(i-1, nex2);

    a1.push_back(i-1);
    a2.push_back(i-1);
  }
  //cout << "------" << endl;
  //rep(ii, n) _p("ft1[%d]:%d\n", ii, ft1.sum(ii, ii+1).x);
  //rep(ii, n) _p("ft2[%d]:%d\n", ii, ft2.sum(ii, ii+1).x);
  mint ans = ft1.sum(n) + ft2.sum(n);

  cout << ans << endl;
}
int main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }


Measured memory_bytes: 2812