1 #include<iostream>
2 #include<string>
3 #include<algorithm>
4 #include<cstdio>
5 #include<cstring>
6 #include<cstdlib>
7 #include<cmath>
8 #include<bitset>
9 using namespace std;
10
11 const int ONE=101;
12
13 bitset <ONE> A,Ans_bit;
14
15 int n,d;
16 int Num[ONE],E[ONE][ONE];
17 int Ans;
18 int vis[ONE];
19
20 struct power
21 {
22 int x,y;
23 }a[ONE];
24
25 int get()
26 {
27 int res=1,Q=1;char c;
28 while( (c=getchar())<48 || c>57 )
29 if(c==‘-‘)Q=-1;
30 res=c-48;
31 while( (c=getchar())>=48 && c<=57 )
32 res=res*10+c-48;
33 return res*Q;
34 }
35
36 bool PD(power a,power b)
37 {
38 return (a.x-b.x)*(a.x-b.x) + (a.y-b.y)*(a.y-b.y) <= d * d;
39 }
40
41 void Rand()
42 {
43 for(int i=1;i<=n;i++)
44 swap(Num[i], Num[rand()%n+1]);
45 }
46
47 void Deal()
48 {
49 int res=0;
50 memset(vis,0,sizeof(vis));
51 A.reset();
52
53 for(int i=1;i<=n;i++)
54 if(!vis[i])
55 {
56 res++;
57 A.set(Num[i]);
58
59 for(int j=i+1;j<=n;j++)
60 if(!E[Num[i]][Num[j]]) vis[j]=1;
61 }
62
63 if(Ans < res)
64 {
65 Ans = res;
66 Ans_bit = A;
67 }
68 }
69
70 int main()
71 {
72 n=get(); d=get();
73 for(int i=1;i<=n;i++)
74 {
75 a[i].x=get(); a[i].y=get(); Num[i]=i;
76 }
77
78 for(int i=1;i<=n;i++)
79 for(int j=i+1;j<=n;j++)
80 {
81 E[i][j] = E[j][i] = PD(a[i],a[j]);
82 }
83
84 for(int i=1;i<=1000;i++)
85 Rand(), Deal();
86
87
88 printf("%d\n",Ans);
89 for(int i=1;i<=n;i++)
90 if(Ans_bit[i]) printf("%d ",i);
91 }