#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) typedef vector VI; typedef vector VVI; typedef vector VL; typedef vector VVL; typedef long long LL; #define all(a) (a).begin(), (a).end() #define Yes(n) cout << ((n) ? "Yes" : "No" ) << endl #define ALL(a) (a).begin(),(a).end() #define pb push_back int n,kk; LL k; LL dd(LL a,LL b){ //cout<>n>>kk; k=LL(kk)*kk; VVI H(n,VI(3)); rep(i,n){ cin>>H[i][0]; } rep(i,n){ cin>>H[i][1]>>H[i][2]; } sort(all(H)); bool K[n]={}; int ans=n; rep(i,n){ rep(j,i){ if(K[j]==1||H[j][0]==H[i][0]){continue;} if(dd(H[i][1]-H[j][1],H[i][2]-H[j][2])<=k){K[j]=1;ans--;} } } cout<