N,A,B = map(int,input().split()) XYK = [list(map(int,input().split())) for _ in range(N)] BN = 1 << N def dist(a,b): return abs(XYK[a][0] - XYK[b][0]) + abs(XYK[a][1] - XYK[b][1]) q = set() cnt = 1 for i in range(N): for j in range(N): if i == j: continue if B <= abs(XYK[i][2]- XYK[j][2]) or A < dist(i,j): cnt = 2 tmp = (1<