// Original C++ solution (slower):
#include<bits/stdc++.h>

using namespace std;

#define fs first

#define sc second

#define pb push_back

#define mp make_pair

#define eb emplace_back

#define ALL(A) A.begin(),A.end()

#define RALL(A) A.rbegin(),A.rend()

typedef long long LL;

typedef pair<LL,LL> P;

const LL mod=1000000007;

const LL LINF=1LL<<60;

const int INF=1<<30;

int dx[]={1,0,-1,0};

int dy[]={0,1,0,-1};



template<int mod>

struct ModInt {

    int x;



    ModInt() : x(0) {}

    ModInt(long long y) : x(y >= 0 ? y % mod : (mod - (-y) % mod) % mod) {}



    ModInt &operator+=(const ModInt &p) {

        if((x += p.x) >= mod) x -= mod;

        return *this;

    }

    ModInt &operator-=(const ModInt &p) {

        if((x += mod - p.x) >= mod) x -= mod;

        return *this;

    }

    ModInt &operator*=(const ModInt &p) {

        x = (int)(1LL * x * p.x % mod);

        return *this;

    }

    ModInt &operator/=(const ModInt &p) {

        *this *= p.inverse();

        return *this;

    }



    ModInt operator-() const { return ModInt(-x); }

    ModInt operator+(const ModInt &p) const { return ModInt(*this) += p; }

    ModInt operator-(const ModInt &p) const { return ModInt(*this) -= p; }

    ModInt operator*(const ModInt &p) const { return ModInt(*this) *= p; }

    ModInt operator/(const ModInt &p) const { return ModInt(*this) /= p; }



    bool operator==(const ModInt &p) const { return x == p.x; }

    bool operator!=(const ModInt &p) const { return x != p.x; }



    ModInt inverse() const{

        int a = x, b = mod, u = 1, v = 0, t;

        while(b > 0) {

            t = a / b;

            a -= t * b;

            swap(a, b);

            u -= t * v;

            swap(u, v);

        }

        return ModInt(u);

    }



    ModInt pow(int e){

        long long a = 1, p = x;

        while(e > 0) {

            if(e%2 == 0) {p = (p*p) % mod; e /= 2;}

            else {a = (a*p) % mod; e--;}

        }

        return ModInt(a);

    }



    friend ostream &operator<<(ostream &os, const ModInt<mod> &p) {

        return os << p.x;

    }

    friend istream &operator>>(istream &is, ModInt<mod> &a) {

        long long x;

        is >> x;

        a = ModInt<mod>(x);

        return (is);

    }

};



using modint = ModInt<mod>;



const int M_N=200000;



struct BIT{

    //1-indexed

    int n;

    modint bit[M_N+1];

    //iまでの総和を返す

    modint sum(int i){

        modint s=0;

        while(i>0){

            s+=bit[i];

            i=i&(i-1);

        }

        return s;

    }

    //iにx加算する

    void add(int i,modint x){

        while(i<=n){

            bit[i]+=x;

            i+=i&-i;

        }

    }



};



int main(){

    int n;

    LL A,B;

    cin >> n >> A >> B;

    vector<LL> s(n+1,-LINF);

    for (int i = 0; i < n; i++) {

        cin >> s[i+1];

    }

    BIT bit[2];

    bit[0].n = bit[1].n = n + 1;

    bit[0].add(1,1);

    bit[1].add(1,1);

    int la = 1, lb = 1;

    for (int i = 1; i < n; i++) {

        auto x = upper_bound(ALL(s),s[i+1] - A) - s.begin();

        bit[0].add(i + 1,bit[1].sum(min(i,(int)x)));

        auto y = upper_bound(ALL(s),s[i+1] - B) - s.begin();

        bit[1].add(i + 1,bit[0].sum(min(i,(int)y)));

        if(s[i+1] < s[i] + A){

            for (int j = la; j <= i; j++) {

                bit[0].add(j,-bit[0].sum(j));

            }

            la = i + 1;

        }

        if(s[i+1] < s[i] + B){

            for (int j = lb; j <= i; j++) {

                bit[1].add(j,-bit[1].sum(j));

            }

            lb = i + 1;

        }

    }

    cout << bit[0].sum(n + 1) + bit[1].sum(n + 1) << endl;

    return 0;

}


// Optimized solution to the same problem (faster):
#include<bits/stdc++.h>

using namespace std;

#define fs first

#define sc second

#define pb push_back

#define mp make_pair

#define eb emplace_back

#define ALL(A) A.begin(),A.end()

#define RALL(A) A.rbegin(),A.rend()

typedef long long LL;

typedef pair<LL,LL> P;

const LL mod=1000000007;

const LL LINF=1LL<<60;

const int INF=1<<30;

int dx[]={1,0,-1,0};

int dy[]={0,1,0,-1};







const int M_N=200000;



struct BIT{

    //1-indexed

    LL bit[M_N+1],n;

    //iまでの総和を返す

    LL sum(int i){

        LL s=0;

        while(i>0){

            s=(s + bit[i])%mod;

            i=i&(i-1);

        }

        return s;

    }

    //iにx加算する

    void add(int i,LL x){

        x %= mod;

        while(i<=n){

            bit[i]=(bit[i] + x)%mod;

            i+=i&-i;

        }

    }



};



int main(){

    int n;

    LL A,B;

    cin >> n >> A >> B;

    vector<LL> s(n+1,-LINF);

    for (int i = 0; i < n; i++) {

        cin >> s[i+1];

    }

    BIT bit[2];

    bit[0].n = bit[1].n = n + 1;

    bit[0].add(1,1);

    bit[1].add(1,1);

    int la = 1, lb = 1;

    for (int i = 1; i < n; i++) {

        auto x = upper_bound(ALL(s),s[i+1] - A) - s.begin();

        bit[0].add(i + 1,bit[1].sum(min(i,(int)x)));

        auto y = upper_bound(ALL(s),s[i+1] - B) - s.begin();

        bit[1].add(i + 1,bit[0].sum(min(i,(int)y)));

        if(s[i+1] < s[i] + A){

            for (int j = la; j <= i; j++) {

                bit[0].add(j,mod-bit[0].sum(j)%mod);

            }

            la = i + 1;

        }

        if(s[i+1] < s[i] + B){

            for (int j = lb; j <= i; j++) {

                bit[1].add(j,mod-bit[1].sum(j)%mod);

            }

            lb = i + 1;

        }

    }

    cout << (bit[0].sum(n + 1) + bit[1].sum(n + 1))%mod << endl;

    return 0;

}


// Fastest known solution for this problem: