package main import . "fmt" import . "math" type J struct { h int x,y float64 destroy bool } func (j *J)After(t *J)bool { return j.h>t.h } func (j *J)Dist(t *J)float64 { dx:=j.x-t.x dy:=j.y-t.y return Sqrt(dx*dx+dy*dy) } func main() { var n int var k float64 Scan(&n,&k) js:=make([]*J,n) for i:=range js { j:=new(J) Scan(&j.h) js[i]=j } for _,j:=range js { Scan(&j.x,&j.y) } for _,j:=range js { for _,t:=range js { if j.After(t)&&j.Dist(t)<=k { t.destroy=true } } } c:=0 for _,j:=range js { if !j.destroy { c++ } } Println(c) }