import std.stdio;
import std.conv, std.array, std.algorithm, std.string;
import std.math, std.random, std.range, std.datetime;
import std.bigint;

const ulong MOD = 1_000_000_007;

class X{
	BigInt value;
	int id;
	int next1, next2;
	this(int id, string s){
		this.id = id;
		this.value = BigInt(s);
		}
	}

void main(){
	int n;
	BigInt a, b;
	{
		string[] tmp = readln.chomp.split;
		n = tmp[0].to!int, a = BigInt(tmp[1]), b = BigInt(tmp[2]);
		}
	
	if(a < b) a += b, b = a - b, a -= b;
	
	debug writeln([a, b]);
	
	X[] xs;
	for(int i = 0; i < n; i ++){
		xs ~= new X(i, readln.chomp);
		}
	
	for(int i = 0, j = 0; i < n; ){
		if(j == n - 1 || xs[i].value + a <= xs[j + 1].value){
			xs[i].next1 = j;
			i += 1;
			}
		else j += 1;
		}
	for(int i = 0, j = 0; i < n; ){
		if(j == n - 1 || xs[i].value + b <= xs[j + 1].value){
			xs[i].next2 = j;
			i += 1;
			}
		else j += 1;
		}
	
	debug writeln(xs.map!(x => x.next1));
	debug writeln(xs.map!(x => x.next2));
	
	bool f = 0;
	for(int i = 0; i < n - 1; i ++){
		if(xs[i].next2 < i) f = 1;
		}
	if(f){
		"0".writeln;
		return;
		}
	
	ulong[100_009] ps; // i以前にXがない場合の数
	
	ps[n] = 0, ps[n - 1] = 1;
	for(int i = n - 2; i >= 0; i --){
		if(xs[i].next2 >= i + 1){
			ps[i] += ps[i + 1], ps[i] %= MOD;
			}
		ps[i] += ps[xs[i].next1 + 1], ps[i] %= MOD;
		}
	
	debug ps[0 .. n].writeln;
	
	ps[0].writeln;
	}
	