#include using namespace std; using ll=long long; using pll=pair; using tll=tuple; using ld=long double; const ll INF=(1ll<<60); #define rep(i,n) for (ll i=0;i<(ll)(n);i++) #define all(v) v.begin(),v.end() template void chmin(T &a,T b){ if(a>b){ a=b; } } template void chmax(T &a,T b){ if(a> n >> a >> b; vector x(n),y(n),k(n); rep(i,n) cin >> x[i] >> y[i] >> k[i]; auto dist=[&](ll i,ll j){ return abs(x[i]-x[j])+abs(y[i]+y[j]); }; vector>> dp(1<>(n,vector(n,0))); rep(i,n){ rep(j,n){ if(i==j) continue; if(a<=dist(i,j)/*||b<=abs(k[i]-k[j])*/) dp[(1<