#include <map>
#include <set>
#include <list>
#include <cmath>
#include <ctime>
#include <deque>
#include <queue>
#include <stack>
#include <string>
#include <bitset>
#include <cstdio>
#include <limits>
#include <vector>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <fstream>
#include <numeric>
#include <sstream>
#include <cassert>
#include <iomanip>
#include <iostream>
#include <algorithm>
#include <unordered_set>
#include <unordered_map>

using namespace std;

#define f first
#define s second
#define pb push_back
#define pp pop_back
#define mp make_pair
#define ll long long
#define ld double
#define ull unsigned long long
#define PI pair < int, int > 

const int N = 2e5 + 123;
const int M = 123;
const ld Pi = acos(-1);
const ll Inf = 1e18;
const int inf = 1e9;
const int mod = 1e9 + 7;
const int Sz = 501;
const int MOD = 1e9 + 7;

void add(int &a, int b) {
  a += b;
  if (a >= mod) a -= mod;
}
int mult(int a, int b) {
  return 1ll * a * b % mod;
}
int sum(int a, int b) {
  add(a, b);
  return a;
}

int n, buf[2][N], dp[2][N], t[2][N * 4], Add[2][N * 4];
ll x[N], a, b;

void push(int tt, int v, int tl, int tr) {
  if (Add[tt][v] == -1) return;
  if (tl != tr) {
    Add[tt][v * 2] = Add[tt][v];
    Add[tt][v * 2 + 1] = Add[tt][v];
  } 
  t[tt][v] = mult(tr - tl + 1, Add[tt][v]);
  Add[tt][v] = -1;
}
void assign(int l, int r, int x, int tt, int v = 1, int tl = 0, int tr = n) {
  push(tt, v, tl, tr);
  if (tl > r || tr < l) return;
  if (l <= tl && tr <= r) {
    Add[tt][v] = x;
    push(tt, v, tl, tr);
    return;
  }
  int tm = (tl + tr) / 2;
  assign(l, r, x, tt, v * 2, tl, tm);
  assign(l, r, x, tt, v * 2 + 1, tm + 1, tr);
  t[tt][v] = sum(t[tt][v * 2], t[tt][v * 2 + 1]);
}
int get(int l, int r, int tt, int v = 1, int tl = 0, int tr = n) {
  push(tt, v, tl, tr);
  if (tl > r || tr < l) return 0;
  if (l <= tl && tr <= r) return t[tt][v];
  int tm = (tl + tr) / 2;
  return sum(get(l, r, tt, v * 2, tl, tm), get(l, r, tt, v * 2 + 1, tm + 1, tr));
}
void solve() { 
  memset(Add, 0, sizeof Add);
  cin >> n >> a >> b;
  x[0] = -1e18;
  for (int i = 1;i <= n;i++) {
    cin >> x[i];
  }
  assign(0, 0, 1, 0);
  assign(0, 0, 1, 1);
  dp[0][0] = dp[1][0] = 1;
  for (int i = 2, j1 = 0, j2 = 0;i <= n;i++) {
    while(x[i] - x[j1 + 1] >= a) j1++;
    while(x[i] - x[j2 + 1] >= b) j2++;
    int tmp1 = get(0, j1, 1);
    int tmp2 = get(0, j2, 0);
    if (x[i] - x[i - 1] < a) assign(0, i - 1, 0, 0);
    if (x[i] - x[i - 1] < b) assign(0, i - 1, 0, 1);
    assign(i - 1, i - 1, tmp1, 0);
    assign(i - 1, i - 1, tmp2, 1);
    continue;
    cout << "i = " << i << " " << x[i] - x[i - 1] << " j1 = " << j1 << " j2 = " << j2 << endl;
    for (int j = 0;j < i;j++) {
      cout << "j = " << j << " d0 = " << get(j, j, 0) << " d1 = " << get(j, j, 1) << endl;
    }
    continue;
    for (int j = 0;j < i - 1;j++) {
      if (x[i] - x[i - 1] >= a) add(buf[0][j], dp[0][j]);
      if (x[i] - x[j] >= b) add(buf[1][i - 1], dp[0][j]); 
      if (x[i] - x[j] >= a) add(buf[0][i - 1], dp[1][j]);
      if (x[i] - x[i - 1] >= b) add(buf[1][j], dp[1][j]);
    }
    for (int j = 0;j < i;j++) {
      dp[0][j] = buf[0][j]; buf[0][j] = 0;
      dp[1][j] = buf[1][j]; buf[1][j] = 0;
    }
   // continue;
    cout << "after i = " << i << endl;
    for (int j = 0;j < i;j++) {
      cout << "j = " << j << " d0 = " << dp[0][j] << " d1 = " << dp[1][j] << endl;
    }
  }
  int ans = sum(t[0][1], t[1][1]); 
  cout << ans << endl;
}
  
int main() {
  #ifdef wws
   freopen("in", "r", stdin);
   // freopen("in", "w", stdout);
  #endif 
  ios_base::sync_with_stdio(0);
  int tt = 1; 
  while(tt--) solve();
  return 0;
}

Measured memory_bytes: 15872