#include <utility>
#include <algorithm>
#include <vector>
#include <string>
#include <iostream>
namespace loquat {
template <int MOD>
class modulus_integer {
public:
	typedef modulus_integer<MOD> self_type;
private:
	int m_value;
	static self_type unsafe_construct(int x){
		self_type y;
		y.m_value = x;
		return y;
	}
public:
	modulus_integer()
		: m_value(0)
	{ }
	modulus_integer(int x)
		: m_value(x % MOD)
	{
		if(m_value < 0){ m_value += MOD; }
	}
	int operator*() const { return m_value; }
	self_type& operator=(const self_type& x){
		m_value = x.m_value;
		return *this;
	}
	self_type operator+(const self_type& x) const {
		const int y = m_value + x.m_value;
		return unsafe_construct(y >= MOD ? y - MOD : y);
	}
	self_type operator-(const self_type& x) const {
		const int y = m_value - x.m_value;
		return unsafe_construct(y < 0 ? y + MOD : y);
	}
	self_type& operator+=(const self_type& x){
		return (*this = *this + x);
	}
	self_type& operator-=(const self_type &x){
		return (*this = *this - x);
	}
	self_type& operator++(){
		if(++m_value >= MOD){ m_value = 0; }
		return *this;
	}
};
template <int MOD>
inline std::ostream& operator<<(
	std::ostream& os, const modulus_integer<MOD>& x)
{
	os << *x;
	return os;
}
}
using namespace std;
using ll = long long;
using mint = loquat::modulus_integer<1000000007>;
static const ll INF = 2000000000000000000ll;
template <class T>
struct MinTraits {
	typedef T value_type;
	value_type default_value() const {
		return std::numeric_limits<value_type>::max();
	}
	value_type operator()(const value_type &a, const value_type &b) const {
		return std::min(a, b);
	}
};
template <class Traits>
class NazoTable {
public:
	typedef typename Traits::value_type value_type;
private:
	Traits m_traits;
	std::vector<std::vector<value_type>> m_table;
	template <typename Iterator>
	void forward_fill(Iterator it, int row, int first, int last){
		value_type acc = m_traits.default_value();
		m_table[row][first] = acc;
		for(int i = first + 1; i < last; ++i, ++it){
			acc = m_traits(acc, *it);
			m_table[row][i] = acc;
		}
	}
	template <typename Iterator>
	void backward_fill(Iterator it, int row, int first, int last){
		value_type acc = m_traits.default_value();
		--it;
		for(int i = first - 1; i >= last; --i, --it){
			acc = m_traits(*it, acc);
			m_table[row][i] = acc;
		}
	}
public:
	template <class Iterator>
	NazoTable(Iterator first, Iterator last, const Traits &traits = Traits())
		: m_traits(traits)
		, m_table()
	{
		const int n = std::distance(first, last);
		const int b = 32 - __builtin_clz(n + 1);
		m_table.assign(b, std::vector<value_type>(n + 1));
		Iterator it = first;
		++it;
		for(int i = 1; i <= n; ++i, ++it){
			const int ctz = __builtin_ctz(i);
			backward_fill(it, ctz, i, i - (1 << ctz));
			forward_fill(it, ctz, i, std::min(n + 1, i + (1 << ctz)));
		}
	}
	value_type query(size_t l, size_t r) const {
		if(l == r){ return m_traits.default_value(); }
		const int s = 31 - __builtin_clz(l ^ r);
		return m_traits(m_table[s][l], m_table[s][r]);
	}
};
int main(){
	ios_base::sync_with_stdio(false);
	int n;
	ll a, b;
	cin >> n >> a >> b;
	vector<ll> s(n + 1, INF);
	for(int i = 0; i < n; ++i){ cin >> s[i]; }
	if(a < b){ swap(a, b); }
	for(int i = 0; i + 2 < n; ++i){
		if(s[i + 2] - s[i] < b){
			cout << 0 << endl;
			return 0;
		}
	}
	vector<ll> d(n, INF);
	for(int i = 0; i + 1 < n; ++i){ d[i] = s[i + 1] - s[i]; }
	NazoTable<MinTraits<ll>> dq(d.begin(), d.end());
	vector<mint> dp(n + 1), integral(n + 2);
	for(int i = 0; i < n; ++i){
		if(i == 0 || dq.query(0, i - 1) >= b){ ++dp[i]; }
		dp[i] += integral[i];
		const int lower = lower_bound(s.begin(), s.end(), s[i] + a) - s.begin();
		int l = lower, r = n + 1;
		while(l < r){
			const int c = l + (r - l) / 2;
			const ll v = dq.query(i + 1, c - 1);
			if(v >= b){
				l = c + 1;
			}else{
				r = c;
			}
		}
		const int upper = l;
		integral[lower] += dp[i];
		integral[upper] -= dp[i];
		integral[i + 1] += integral[i];
	}
	mint answer = integral[n];
	if(dq.query(0, n - 1) >= b){ answer += mint(1); }
	cout << answer << endl;
	return 0;
}


Measured memory_bytes: 16000