#include using namespace std; using ll = long long; using vll =vector; using vvll =vector; using vb=vector; using vvb=vector; using vvvb=vector; #define rep(i,n) for(ll i=(ll)(0); i<(ll(n)); ++i) #define all(x) (x).begin(), (x).end() int main(){ ll N,A,B; cin>>N>>A>>B; vll X(N),Y(N),K(N); rep(i,N)cin>>X[i]>>Y[i]>>K[i]; vvvb DP(1<=1){ if(B<=abs(K[j]-K[k]))DP[bit+(1<=2){ if(A<=XS+YS)DP[bit+(1<