N,A,B = map(int,input().split()) XYK = [list(map(int,input().split())) for _ in range(N)] BN = 1 << N dp = [[[False] * (BN) for _ in range(N+1)] for _ in range(N+1)] def dist(a,b): return abs(XYK[a][0] - XYK[b][0]) + abs(XYK[a][1] - XYK[b][1]) def bit_count(x): cnt = 0 while x > 0: if x & 1: cnt += 1 x >>= 1 return cnt 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<