#include using namespace std; templatebool chmax(T &a, const T &b) { if (abool chmin(T &a, const T &b) { if (b; using graph = vector>; const int dx[4] = {1, 0, -1, 0}; const int dy[4] = {0, 1, 0, -1}; const ll INF = 1LL<<60; const ll mod = 1000000007LL; #define rep(i, n) for (int i = 0; i < (int)(n); i++) template struct UnionFind { vector par,rank,large; void init(T N){ rank.assign(N,0); large.assign(N,1); par.resize(N); for(T i= 0; i < N; i++){ par[i]=i; } } T root(T x) { if (par[x] == x) return x; return par[x] = root(par[x]); } void unite(T x, T y) { T rx = root(x); T ry = root(y); if (rx == ry) return; if(rank[rx]>N>>A>>B; vector v(N); rep(i,N) cin>>v[i]; UnionFind tree; tree.init(N); int p=0,q=0; rep(i,N){ int s = lower_bound(v.begin(),v.end(),v[i]+A) - v.begin(),t = upper_bound(v.begin(),v.end(),v[i]+B) - v.begin()-1; if(s>t) continue; if(q