#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstring>
#include <deque>
#include <functional>
#include <iomanip>
#include <locale>
#include <iostream>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <queue>
#include <random>
#include <set>
#include <sstream>
#include <string>
#include <tuple>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>

#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define ALL(x) (x).begin(),(x).end()

using namespace std;

using ll = long long;
using ld = long double;

template <typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template <typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template <typename T> int len(const T &x) { return x.size(); }

template<typename T>
vector<T> table(int n, T v) { return vector<T>(n, v); }

template <class... Args>
auto table(int n, Args... args) {
  auto val = table(args...);
  return vector<decltype(val)>(n, move(val));
}

struct yes_no : numpunct<char> {
  string_type do_truename()  const { return "Yes"; }
  string_type do_falsename() const { return "No"; }
};

template<int M, bool IsPrime = false>
class Modulo {
  using ll = long long;
  int n;
  static enable_if_t<IsPrime, ll> inv(ll a, ll p) {
    return (a == 1 ? 1 : (1 - p * inv(p%a, a)) / a + p);
  }
public:
  Modulo () : n(0) {;}
  Modulo (int m) : n(m) {
    if (n >= M) n %= M;
    else if (n < 0) n = (n % M + M) % M;
  }
  Modulo (ll m) {
    if (m >= M) m %= M;
    else if (m < 0) m = (m % M + M) % M;
    n = m;
  }
  explicit operator int() const { return n; }
  explicit operator ll() const { return n; }
  bool operator==(const Modulo &a) const { return n == a.n; }
  Modulo operator+=(const Modulo &a) { n += a.n; if (n >= M) n -= M; return *this; }
  Modulo operator-=(const Modulo &a) { n -= a.n; if (n < 0) n += M; return *this; }
  Modulo operator*=(const Modulo &a) { n = (ll(n) * a.n) % M; return *this; }
  Modulo operator+(const Modulo &a) const { Modulo res = *this; return res += a; }
  Modulo operator-(const Modulo &a) const { Modulo res = *this; return res -= a; }
  Modulo operator*(const Modulo &a) const { Modulo res = *this; return res *= a; }
  Modulo operator^(int n) const {
    if (n == 0) return Modulo(1);
    const Modulo a = *this;
    Modulo res = (a * a) ^ (n / 2);
    return n % 2 ? res * a : res;
  }
  enable_if_t<IsPrime, Modulo> operator/(const Modulo &a) const {
    return *this * inv(ll(a), M);
  }
};

template<int M> Modulo<M, true> fact(int n, bool sw = true) {
  static vector<Modulo<M, true>> v1 = {1}, v2 = {1};
  if (n >= (int)v1.size()) {
    const int from = v1.size(), to = n + 1024;
    v1.reserve(to);
    v2.reserve(to);
    for (int i = from; i < to; ++i) {
      v1.push_back(v1.back() * Modulo<M, true>(i));
      v2.push_back(v2.back() / Modulo<M, true>(i));
    }
  }
  return sw ? v1[n] : v2[n];
}

template<int M> Modulo<M, true> comb(int a, int b) {
  if (b < 0 || b > a) return 0;
  return fact<M>(a, true) * fact<M>(b, false) * fact<M>(a-b, false);
}

const int mod = 1000000007;
using Mod = Modulo<mod, true>;

Mod raw(const map<int,pair<Mod,Mod>> &m, int n) {
  auto it = m.upper_bound(n);
  if (it == begin(m)) return 0;
  --it;
  return it->second.first;
}

Mod sum(const map<int,pair<Mod,Mod>> &m, int n) {
  auto it = m.upper_bound(n);
  if (it == begin(m)) return 0;
  --it;
  return it->second.second;
}

void adds(map<int,pair<Mod,Mod>> &m, int n, Mod val) {
  if (m.empty()) {
    m[n] = make_pair(val, val);
    return;
  }
  pair<Mod,Mod> res = prev(m.end())->second;
  res.first = val;
  res.second += val;
  m[n] = res;
}

void output(map<int,pair<Mod,Mod>> &m) {
  REP(i,10) cout << (m.count(i-1) ? int(m[i-1].first) : 0) << " ";
  cout << endl;
  REP(i,10) cout << (m.count(i-1) ? int(m[i-1].second) : 0) << " ";
  cout << endl;
}

void solve(ll N, ll A, ll B, vector<ll> S) {
  vector<ll> v;
  v.push_back(-2e18);
  for (ll i: S) v.push_back(i);
  map<int,pair<Mod,Mod>> dpa, dpb;
  dpb[-1] = make_pair(1, 1);
  // output(dpa);
  // output(dpb);
  // cout << endl;
  REP(i,N) {
    // cout << i << endl;
    bool clean_a = false, clean_b = false;
    if (v[i + 1] >= v[i] + A) ; //adds(dpa, i + 1, raw(dpa, i));
    else clean_a = true;
    if (v[i + 1] >= v[i] + B) ; //adds(dpb, i + 1, raw(dpb, i));
    else clean_b = true;
    int it1 = upper_bound(ALL(v), v[i+1] - A) - begin(v) - 1;
    Mod dpa_val = sum(dpb, it1);
    int it2 = upper_bound(ALL(v), v[i+1] - B) - begin(v) - 1;
    Mod dpb_val = sum(dpa, it2);
    if (clean_a) dpa.clear();
    if (clean_b) dpb.clear();
    adds(dpa, i, dpa_val);
    adds(dpb, i, dpb_val);
    // output(dpa);
    // output(dpb);
    // cout << endl;
  }
  cout << int(sum(dpa, N + 10) + sum(dpb, N + 10)) << endl;
}

int main() {
  locale loc(locale(), new yes_no);
  cout << boolalpha << setprecision(12) << fixed;
  cout.imbue(loc);
	ll N;
	ll A;
	ll B;
	scanf("%lld", &N);
	vector<ll> S(N-1+1);
	scanf("%lld", &A);
	scanf("%lld", &B);
	for (int i = 0 ; i <= N-1 ; i++) {
	  scanf("%lld", &S[i]);
	}
	solve(N, A, B, S);
	return 0;
}


Measured memory_bytes: 15092