from collections import * from itertools import * from functools import * from heapq import * import sys,math input = sys.stdin.readline N,A,B = map(int,input().split()) X = list(map(int,input().split())) INF = (1<<60) n = math.ceil(math.sqrt(N)) M = n**2 X = X + [INF]*(M - len(X)) e = [[] for _ in range(M+n)] for i in range(n): for j in range(n): e[M+i].append(n*i+j) for i in range(N): xi = X[i] l = N ng = i while l-ng>1: mid = (l+ng)//2 if X[mid]>=A+xi: l = mid else: ng = mid r = i ng = N while ng-r>1: mid = (ng+r)//2 if X[mid]<=xi+B: r = mid else: ng = mid r += 1 if l < r: L = (l+n-1)//n R = (r+n-1)//n if L==R: for j in range(l,r): e[i].append(j) else: for j in range(l,n*L): e[i].append(j) e[j].append(i) for j in range(M+L,M+R-1): e[i].append(j) e[j].append(i) for j in range(n*(R-1),r): e[i].append(j) e[j].append(i) ng = 0 l = 0 if xi - X[ng]>B: l = i while l-ng>1: mid = (ng+l)//2 if xi - X[mid]>B: ng = mid else: l = mid r = 0 ng = i+1 if xi-X[r]1: mid = (ng+r)//2 if xi - X[mid] >= A: r = mid else: ng = mid r += 1 if l>=r: continue L = (l+n-1)//n R = (r+n-1)//n if L==R: for j in range(l,r): e[i].append(j) else: for j in range(l,n*L): e[i].append(j) e[j].append(i) for j in range(M+L,M+R-1): e[i].append(j) e[j].append(i) for j in range(n*(R-1),r): e[i].append(j) e[j].append(i) visited = [False]*(M+n) ans = [1]*(M+n) for i in range(N): if visited[i]: continue visited[i]=True v = deque() v.append(i) target = deque() target.append(i) cnt = 1 while v: x = v.popleft() for ix in e[x]: if visited[ix]: continue visited[ix] = True if ix