#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using PII = pair<int, int>;
using VI = vector<int>;

const ll mod = 1e9 + 7, INF = 2e18;
inline ll add(ll u, ll v) {
  return (u + v) % mod;
}
inline ll sub(ll u, ll v) {
  return (u - v + mod) % mod;
}
inline ll mul(ll u, ll v) {
  return u * v % mod;
}

const int N = 2e5 + 10, LOG = 22;
ll s[N];
ll dp[N][2][2], suf[N][2][2]; // X=0, Y=1

ll sp[N][LOG];
int pw2[N];
void build(int n) {
  pw2[1] = 0;
  for (int i = 2; i < N; i++) {
    pw2[i] = pw2[i - 1];
    if ((1 << (pw2[i] + 1)) == i) {
      pw2[i]++;
    }
  }

  for (int j = 0; j < LOG; j++) {
    sp[n][j] = INF;
  }
  for (int i = n - 1; i >= 1; i--) {
    ll v = s[i + 1] - s[i];
    sp[i][0] = v;
    for (int j = 1; j < LOG; j++) {
      int ii = i + (1 << (j - 1));
      ii = min(ii, n);
      sp[i][j] = min(sp[i][j - 1], sp[ii][j - 1]);
    }
  }
}

ll get(int l, int r) {
  if (r <= l) return INF;
  r--;
  int j = pw2[r - l + 1];
  ll res = min(sp[l][j], sp[r - (1 << j) + 1][j]);
  return res;
}

int main() {
#ifdef LOCAL_EXEC
//	freopen("sample.in", "r", stdin);
//	freopen("sample.out", "w", stdout);
#else
  ios_base::sync_with_stdio(false); cin.tie(NULL);
#endif

  int n; ll a, b; cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    cin >> s[i];
  }
  if (a > b) swap(a, b);

  if (n == 1) {
    cout << 2 << endl;
    return 0;
  }

  build(n);

  dp[n - 1][0][0] = get(n - 1, n) >= a ? 1 : 0;
  dp[n - 1][0][1] = dp[n - 1][1][0] = 1;
  dp[n - 1][1][1] = get(n - 1, n) >= b ? 1 : 0;

  for (int x: {0, 1}) {
    for (int y: {0, 1}) {
      suf[n - 1][x][y] = dp[n - 1][x][y];
    }
  }

  for (int i = n - 2; i >= 1; i--) {
    // s[i] \in X ==> dp[i][0][*]
    int st = lower_bound(s, s + n + 1, s[i] + a) - s;
    if (st <= n && get(i + 1, st - 1) >= b) {
      int lo = st, hi = n;
      int en = -1;
      while (lo <= hi) {
        int mid = (lo + hi) / 2;
        if (get(i + 1, mid - 1) < b) {
          hi = mid - 1;
        } else {
          en = mid;
          lo = mid + 1;
        }
      }
      if (en != -1) {
        if (st == i + 1) {
          dp[i][0][0] = add(dp[i + 1][0][0], dp[i + 1][0][1]);
          ++st;
        }
        if (st <= en) {
          dp[i][0][1] = sub(suf[st - 1][1][0], suf[en][1][0]);
        }
      }
    }
    if (get(i + 1, n) >= b) {
      dp[i][0][1] = add(dp[i][0][1], 1);
    }

    // s[i] \in Y ==> dp[i][1][*]
    st = lower_bound(s, s + n + 1, s[i] + b) - s;
    if (st <= n && get(i + 1, st - 1) >= a) {
      int lo = st, hi = n;
      int en = -1;
      while (lo <= hi) {
        int mid = (lo + hi) / 2;
        if (get(i + 1, mid - 1) < a) {
          hi = mid - 1;
        } else {
          en = mid;
          lo = mid + 1;
        }
      }
      if (en != -1) {
        if (st == i + 1) {
          dp[i][1][1] = add(dp[i + 1][1][0], dp[i + 1][1][1]);
          ++st;
        }
        if (st <= en) {
          dp[i][1][0] = sub(suf[st - 1][0][1], suf[en][0][1]);
        }
      }
    }
    if (get(i + 1, n) >= a) {
      dp[i][1][0] = add(dp[i][1][0], 1);
    }

    // compute suf[i][*][*]
    for (int x: {0, 1}) {
      for (int y: {0, 1}) {
        suf[i][x][y] = add(suf[i + 1][x][y], dp[i][x][y]);
      }
    }
  }

  ll ans = add(
    add(dp[1][0][0], dp[1][0][1]),
    add(dp[1][1][0], dp[1][1][1]));
  cout << ans << endl;

  return 0;
}


Measured memory_bytes: 28672