#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
#include<time.h>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
using namespace std;
const int MAX_N = 1005;
const int MAX_K = 31;
struct Pair {
	int a, b, dist;
	bool operator<(const Pair&o) const {
		return dist < o.dist;
	}
};
int x[MAX_N], y[MAX_N], n, k;
int dist[MAX_N][MAX_N];
Pair ps[MAX_N * MAX_N];
int nPs;
bool used[MAX_N];
const double EPS = 1e-8;
inline int sign(double a) {
	return a < -EPS ? -1 : a > EPS;
}
typedef long long int64;
struct Point {
	int64 x, y;
	Point() {
	}
};
Point pt[MAX_N];
#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
int leftId[MAX_N], rightId[MAX_N];
vector<int> edge[MAX_N];
int pR[MAX_N];
int mark[MAX_N], cur = 0;
bool dfs(int u) {
	if (mark[u] == cur)
		return false;
	mark[u] = cur;
	for (vector<int>::iterator e = edge[u].begin(); e != edge[u].end(); ++e) {
		if (pR[*e] == -1 || dfs(pR[*e]))
			return pR[*e] = u, true;
	}
	return false;
}
bool check(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int bad = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[i][a] <= d && dist[i][b] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
			}
		}
	if (bad > k)
		return false;
	//return 0;
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			edge[leftId[a]].push_back(rightId[b]);
		}
	}
	int cnt = 0;
	for (int i = 0; i < nL; ++i) {
		++cur;
		if (dfs(i))
			++cnt;
		if (cnt > k - bad) {
			return false;
		}
	}
	return true;
}
const int INF = INT_MAX / 4;
template<class Flow>
struct Maxflow {
	struct Edge {
		int t;
		Flow c;
		Edge*n, *r;
		Edge(int _t, Flow _c, Edge*_n) :
				t(_t), c(_c), n(_n) {
		}
	};
	vector<Edge*> E;
	int addV() {
		E.push_back((Edge*) 0);
		return E.size() - 1;
	}
	void clear() {
		E.clear();
	}
	Edge* makeEdge(int s, int t, Flow c) {
		return E[s] = new Edge(t, c, E[s]);
	}
	Edge* addEdge(int s, int t, Flow c) {
		Edge*e1 = makeEdge(s, t, c), *e2 = makeEdge(t, s, 0);
		e1->r = e2, e2->r = e1;
		return e1;
	}
	int calcMaxFlow(int vs, int vt) {
		int nV = E.size();
		Flow totalFlow = 0;
		Flow MAX_FLOW = INF;
		vector<Flow> am(nV, 0);
		vector<int> h(nV, 0), cnt(nV + 1, 0);
		vector<Edge*> prev(nV, (Edge*) 0), cur(nV, (Edge*) 0);
		cnt[0] = nV;
		int u = vs;
		Edge*e;
		am[u] = MAX_FLOW;
		while (h[vs] < nV) {
			for (e = cur[u]; e; e = e->n)
				if (e->c > 0 && h[u] == h[e->t] + 1)
					break;
			if (e) {
				int v = e->t;
				cur[u] = prev[v] = e;
				am[v] = min(am[u], e->c);
				u = v;
				if (u == vt) {
					Flow by = am[u];
					while (u != vs) {
						prev[u]->c -= by;
						prev[u]->r->c += by;
						u = prev[u]->r->t;
					}
					totalFlow += by;
					am[u] = MAX_FLOW;
				}
			} else {
				if (!--cnt[h[u]])
					break;
				h[u] = nV;
				for (e = E[u]; e; e = e->n)
					if (e->c > 0 && h[e->t] + 1 < h[u]) {
						h[u] = h[e->t] + 1;
						cur[u] = e;
					}
				++cnt[h[u]];
				if (u != vs)
					u = prev[u]->r->t;
			}
		}
		return totalFlow;
	}
	vector<bool> reach;
	void dfs(int u) {
		if (reach[u])
			return;
		reach[u] = true;
		for (Edge* e = E[u]; e; e = e->n)
			if (e->c > 0)
				dfs(e->t);
	}
	void genCut(int src) {
		reach = vector<bool>(E.size());
		dfs(src);
	}
	~Maxflow() {
		for (int i = 0; i < E.size(); ++i) {
			for (Edge*e = E[i]; e;) {
				Edge*ne = e->n;
				delete e;
				e = ne;
			}
		}
	}
	bool isCut(int s, Edge*e) {
		return reach[s] && !reach[e->t];
	}
};
Maxflow<int> sap;
Maxflow<int>::Edge*LE[MAX_N], *RE[MAX_N];
int ls[MAX_N], rs[MAX_N];
bool deled[MAX_N];
void build(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int cnt = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	memset(deled, false, sizeof deled);
	int del[MAX_N];
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[i][a] <= d && dist[i][b] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) {
					leftId[i] = nL;
					ls[nL++] = i;
				} else {
					rightId[i] = nR;
					rs[nR++] = i;
				}
			} else {
				del[cnt++] = i;
				deled[i] = true;
			}
		}
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	sap.clear();
	for (int i = 0; i < nL; ++i) {
		sap.addV();
	}
	for (int i = 0; i < nR; ++i) {
		sap.addV();
	}
	int S = sap.addV(), T = sap.addV();
	for (int i = 0; i < nL; ++i) {
		LE[i] = sap.addEdge(S, i, 1);
	}
	for (int i = 0; i < nR; ++i) {
		RE[i] = sap.addEdge(i + nL, T, 1);
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			int l = leftId[a], r = rightId[b];
			sap.addEdge(l, r + nL, INT_MAX);
		}
	}
	sap.calcMaxFlow(S, T);
	sap.genCut(S);
	for (int i = 0; i < nL; ++i) {
		if (sap.isCut(S, LE[i])) {
			deled[ls[i]] = true;
			del[cnt++] = ls[i];
		}
	}
	for (int i = 0; i < nR; ++i) {
		if (sap.isCut(i + nL, RE[i])) {
			deled[rs[i]] = true;
			del[cnt++] = rs[i];
		}
	}
	for (int i = 0; i < n; ++i) {
		if (!deled[i] && cnt < k) {
			deled[i] = true;
			del[cnt++] = i;
		}
	}
	for (int i = 0; i < cnt; ++i) {
		printf("%d ", del[i] + 1);
	}
	puts("");
}
int main() {
	//freopen("1.in","r",stdin);
	//freopen("1.out","w",stdout);
	cin >> n >> k;
	int t1=clock();
	for (int i = 0; i < n; ++i) {
		scanf("%d%d", x + i, y + i);
		pt[i].x = x[i];
		pt[i].y = y[i];
	}
	if (n - k == 1) {
		for (int i = 1; i < n; ++i) {
			cout << i << " ";
		}
		cout << endl;
		return 0;
	}
	nPs = 0;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			int dx = x[i] - x[j], dy = y[i] - y[j];
			dist[i][j] = dx * dx + dy * dy;
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < i; ++j) {
			ps[nPs++] = (Pair) {i,j,dist[i][j]};
		}
	}
	sort(ps, ps + nPs);
	//printf("sort time=%d\n",clock()-t1);
	int st = nPs;
	for (int i = 0; i < k; ++i) {
		st -= n - 1 - i;
	}
	--st;
	if (st < 0)
		st = 0;
	for (int i = st; i < nPs; i++) {
		if (check(i)) {
			build(i);
			//printf("ans=%d id=%d\n",ps[i].dist,i-st+1);
			//printf("time=%d\n",clock()-t1);
			//system("pause");for (;;);
			return 0;
		}
	}
	//printf("error! time=%d\n",clock()-t1);
	//system("pause");for (;;);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
#include<time.h>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
#define J (")
using namespace std;
const int MAX_N = 1005;
const int MAX_K = 31;
struct Pair {
	int a, b, dist;
	bool operator<(const Pair&o) const {
		return dist < o.dist;
	}
};
int x[MAX_N], y[MAX_N], n, k;
int dist[MAX_N][MAX_N];
Pair ps[MAX_N * MAX_N];
int nPs;
bool used[MAX_N];
const double EPS = 1e-8;
inline int sign(double a) {
	return a < -EPS ? -1 : a > EPS;
}
typedef long long int64;
struct Point {
	int64 x, y;
	Point() {
	}
};
Point pt[MAX_N];
#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
int leftId[MAX_N], rightId[MAX_N];
vector<int> edge[MAX_N];
int pR[MAX_N];
int mark[MAX_N], cur = 0;
bool dfs(int u) {
	if (mark[u] == cur)
		return false;
	mark[u] = cur;
	for (vector<int>::iterator e = edge[u].begin(); e != edge[u].end(); ++e) {
		if (pR[*e] == -1 || dfs(pR[*e]))
			return pR[*e] = u, true;
	}
	return false;
}
bool check(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int bad = 0;
	int nL = 0, nR = 0,*dista=dist[a],*distb=dist[b];
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	if (a>b)swap(a,b);
	for (int i = 0; i < a; ++i){
			if (dista[i] <= d && distb[i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	for (int i = a+1; i < b; ++i){
			if (dista[i] <= d && distb[i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	for (int i = b+1; i < n; ++i){
			if (dista[i] <= d && distb[i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	if (bad > k)
		return false;
	//return 0;
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) edge[i].clear();
	for (int i = who + 1; i < nPs; ++i)
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			edge[leftId[a]].push_back(rightId[b]);
		}
	int cnt = 0;
	for (int i = 0; i < nL; ++i) {
		++cur;
		if (dfs(i))
			++cnt;
		if (cnt > k - bad) {
			return false;
		}
	}
	return true;
}
const int INF = INT_MAX / 4;
template<class Flow>
struct Maxflow {
	struct Edge {
		int t;
		Flow c;
		Edge*n, *r;
		Edge(int _t, Flow _c, Edge*_n) :
				t(_t), c(_c), n(_n) {
		}
	};
	vector<Edge*> E;
	int addV() {
		E.push_back((Edge*) 0);
		return E.size() - 1;
	}
	void clear() {
		E.clear();
	}
	Edge* makeEdge(int s, int t, Flow c) {
		return E[s] = new Edge(t, c, E[s]);
	}
	Edge* addEdge(int s, int t, Flow c) {
		Edge*e1 = makeEdge(s, t, c), *e2 = makeEdge(t, s, 0);
		e1->r = e2, e2->r = e1;
		return e1;
	}
	int calcMaxFlow(int vs, int vt) {
		int nV = E.size();
		Flow totalFlow = 0;
		Flow MAX_FLOW = INF;
		vector<Flow> am(nV, 0);
		vector<int> h(nV, 0), cnt(nV + 1, 0);
		vector<Edge*> prev(nV, (Edge*) 0), cur(nV, (Edge*) 0);
		cnt[0] = nV;
		int u = vs;
		Edge*e;
		am[u] = MAX_FLOW;
		while (h[vs] < nV) {
			for (e = cur[u]; e; e = e->n)
				if (e->c > 0 && h[u] == h[e->t] + 1)
					break;
			if (e) {
				int v = e->t;
				cur[u] = prev[v] = e;
				am[v] = min(am[u], e->c);
				u = v;
				if (u == vt) {
					Flow by = am[u];
					while (u != vs) {
						prev[u]->c -= by;
						prev[u]->r->c += by;
						u = prev[u]->r->t;
					}
					totalFlow += by;
					am[u] = MAX_FLOW;
				}
			} else {
				if (!--cnt[h[u]])
					break;
				h[u] = nV;
				for (e = E[u]; e; e = e->n)
					if (e->c > 0 && h[e->t] + 1 < h[u]) {
						h[u] = h[e->t] + 1;
						cur[u] = e;
					}
				++cnt[h[u]];
				if (u != vs)
					u = prev[u]->r->t;
			}
		}
		return totalFlow;
	}
	vector<bool> reach;
	void dfs(int u) {
		if (reach[u])
			return;
		reach[u] = true;
		for (Edge* e = E[u]; e; e = e->n)
			if (e->c > 0)
				dfs(e->t);
	}
	void genCut(int src) {
		reach = vector<bool>(E.size());
		dfs(src);
	}
	~Maxflow() {
		for (int i = 0; i < E.size(); ++i) {
			for (Edge*e = E[i]; e;) {
				Edge*ne = e->n;
				delete e;
				e = ne;
			}
		}
	}
	bool isCut(int s, Edge*e) {
		return reach[s] && !reach[e->t];
	}
};
Maxflow<int> sap;
Maxflow<int>::Edge*LE[MAX_N], *RE[MAX_N];
int ls[MAX_N], rs[MAX_N];
bool deled[MAX_N];
void build(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int cnt = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	memset(deled, false, sizeof deled);
	int del[MAX_N];
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[i][a] <= d && dist[i][b] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) {
					leftId[i] = nL;
					ls[nL++] = i;
				} else {
					rightId[i] = nR;
					rs[nR++] = i;
				}
			} else {
				del[cnt++] = i;
				deled[i] = true;
			}
		}
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	sap.clear();
	for (int i = 0; i < nL; ++i) {
		sap.addV();
	}
	for (int i = 0; i < nR; ++i) {
		sap.addV();
	}
	int S = sap.addV(), T = sap.addV();
	for (int i = 0; i < nL; ++i) {
		LE[i] = sap.addEdge(S, i, 1);
	}
	for (int i = 0; i < nR; ++i) {
		RE[i] = sap.addEdge(i + nL, T, 1);
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			int l = leftId[a], r = rightId[b];
			sap.addEdge(l, r + nL, INT_MAX);
		}
	}
	sap.calcMaxFlow(S, T);
	sap.genCut(S);
	for (int i = 0; i < nL; ++i) {
		if (sap.isCut(S, LE[i])) {
			deled[ls[i]] = true;
			del[cnt++] = ls[i];
		}
	}
	for (int i = 0; i < nR; ++i) {
		if (sap.isCut(i + nL, RE[i])) {
			deled[rs[i]] = true;
			del[cnt++] = rs[i];
		}
	}
	for (int i = 0; i < n; ++i) {
		if (!deled[i] && cnt < k) {
			deled[i] = true;
			del[cnt++] = i;
		}
	}
	for (int i = 0; i < cnt; ++i) {
		printf("%d ", del[i] + 1);
	}
	puts("");
}
int main() {
	//freopen("2.in","r",stdin);
	//freopen("1.out","w",stdout);
	cin >> n >> k;
	int t1=clock();
	for (int i = 0; i < n; ++i) {
		scanf("%d%d", x + i, y + i);
		pt[i].x = x[i];
		pt[i].y = y[i];
	}
	if (n - k == 1) {
		for (int i = 1; i < n; ++i) {
			cout << i << " ";
		}
		cout << endl;
		return 0;
	}
	nPs = 0;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			int dx = x[i] - x[j], dy = y[i] - y[j];
			dist[i][j] = dx * dx + dy * dy;
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < i; ++j) {
			ps[nPs++] = (Pair) {i,j,dist[i][j]};
		}
	}
	sort(ps, ps + nPs);
	//printf("sort time=%d\n",clock()-t1);
	int st = nPs;
	for (int i = 0; i < k; ++i) {
		st -= n - 1 - i;
	}
	--st;
	if (st < 0)
		st = 0;
	for (int i = st; i < nPs; i++) {
		if (check(i)) {
			build(i);
			//printf("ans=%d id=%d\n",ps[i].dist,i-st+1);
			//printf("time=%d\n",clock()-t1);
			//system("pause");for (;;);
			return 0;
		}
	}
	printf("error! time=%d\n",clock()-t1);
	system("pause");for (;;);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
#include<time.h>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
#define J (")
using namespace std;
const int MAX_N = 1005;
const int MAX_K = 31;
struct Pair {
	int a, b, dist;
	bool operator<(const Pair&o) const {
		return dist < o.dist;
	}
};
int x[MAX_N], y[MAX_N], n, k;
int dist[MAX_N][MAX_N];
Pair ps[MAX_N * MAX_N];
int nPs;
bool used[MAX_N];
const double EPS = 1e-8;
inline int sign(double a) {
	return a < -EPS ? -1 : a > EPS;
}
typedef long long int64;
struct Point {
	int64 x, y;
	Point() {
	}
};
Point pt[MAX_N];
#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
int leftId[MAX_N], rightId[MAX_N];
vector<int> edge[MAX_N];
int pR[MAX_N];
int mark[MAX_N], cur = 0;
bool dfs(int u) {
	if (mark[u] == cur)
		return false;
	mark[u] = cur;
	for (vector<int>::iterator e = edge[u].begin(); e != edge[u].end(); ++e) {
		if (pR[*e] == -1 || dfs(pR[*e]))
			return pR[*e] = u, true;
	}
	return false;
}
bool check(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int bad = 0;
	int nL = 0, nR = 0,*dista=dist[a],*distb=dist[b];
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	if (a>b)swap(a,b);
	for (int i = 0; i < a; ++i){
			if (dista[i] <= d && distb[i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	int bb=b-1;
	for (int i = a+1; i < bb; ++i){
			if (dista[i] <= d && distb[i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	for (int i = b+1; i < n; ++i){
			if (dista[i] <= d && distb[i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	if (bad > k)
		return false;
	//return 0;
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) edge[i].clear();
	for (int i = who + 1; i < nPs; ++i)
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			edge[leftId[a]].push_back(rightId[b]);
		}
	int cnt = 0;
	for (int i = 0; i < nL; ++i) {
		++cur;
		if (dfs(i))
			++cnt;
		if (cnt > k - bad) {
			return false;
		}
	}
	return true;
}
const int INF = INT_MAX / 4;
template<class Flow>
struct Maxflow {
	struct Edge {
		int t;
		Flow c;
		Edge*n, *r;
		Edge(int _t, Flow _c, Edge*_n) :
				t(_t), c(_c), n(_n) {
		}
	};
	vector<Edge*> E;
	int addV() {
		E.push_back((Edge*) 0);
		return E.size() - 1;
	}
	void clear() {
		E.clear();
	}
	Edge* makeEdge(int s, int t, Flow c) {
		return E[s] = new Edge(t, c, E[s]);
	}
	Edge* addEdge(int s, int t, Flow c) {
		Edge*e1 = makeEdge(s, t, c), *e2 = makeEdge(t, s, 0);
		e1->r = e2, e2->r = e1;
		return e1;
	}
	int calcMaxFlow(int vs, int vt) {
		int nV = E.size();
		Flow totalFlow = 0;
		Flow MAX_FLOW = INF;
		vector<Flow> am(nV, 0);
		vector<int> h(nV, 0), cnt(nV + 1, 0);
		vector<Edge*> prev(nV, (Edge*) 0), cur(nV, (Edge*) 0);
		cnt[0] = nV;
		int u = vs;
		Edge*e;
		am[u] = MAX_FLOW;
		while (h[vs] < nV) {
			for (e = cur[u]; e; e = e->n)
				if (e->c > 0 && h[u] == h[e->t] + 1)
					break;
			if (e) {
				int v = e->t;
				cur[u] = prev[v] = e;
				am[v] = min(am[u], e->c);
				u = v;
				if (u == vt) {
					Flow by = am[u];
					while (u != vs) {
						prev[u]->c -= by;
						prev[u]->r->c += by;
						u = prev[u]->r->t;
					}
					totalFlow += by;
					am[u] = MAX_FLOW;
				}
			} else {
				if (!--cnt[h[u]])
					break;
				h[u] = nV;
				for (e = E[u]; e; e = e->n)
					if (e->c > 0 && h[e->t] + 1 < h[u]) {
						h[u] = h[e->t] + 1;
						cur[u] = e;
					}
				++cnt[h[u]];
				if (u != vs)
					u = prev[u]->r->t;
			}
		}
		return totalFlow;
	}
	vector<bool> reach;
	void dfs(int u) {
		if (reach[u])
			return;
		reach[u] = true;
		for (Edge* e = E[u]; e; e = e->n)
			if (e->c > 0)
				dfs(e->t);
	}
	void genCut(int src) {
		reach = vector<bool>(E.size());
		dfs(src);
	}
	~Maxflow() {
		for (int i = 0; i < E.size(); ++i) {
			for (Edge*e = E[i]; e;) {
				Edge*ne = e->n;
				delete e;
				e = ne;
			}
		}
	}
	bool isCut(int s, Edge*e) {
		return reach[s] && !reach[e->t];
	}
};
Maxflow<int> sap;
Maxflow<int>::Edge*LE[MAX_N], *RE[MAX_N];
int ls[MAX_N], rs[MAX_N];
bool deled[MAX_N];
void build(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int cnt = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	memset(deled, false, sizeof deled);
	int del[MAX_N];
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[i][a] <= d && dist[i][b] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) {
					leftId[i] = nL;
					ls[nL++] = i;
				} else {
					rightId[i] = nR;
					rs[nR++] = i;
				}
			} else {
				del[cnt++] = i;
				deled[i] = true;
			}
		}
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	sap.clear();
	for (int i = 0; i < nL; ++i) {
		sap.addV();
	}
	for (int i = 0; i < nR; ++i) {
		sap.addV();
	}
	int S = sap.addV(), T = sap.addV();
	for (int i = 0; i < nL; ++i) {
		LE[i] = sap.addEdge(S, i, 1);
	}
	for (int i = 0; i < nR; ++i) {
		RE[i] = sap.addEdge(i + nL, T, 1);
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			int l = leftId[a], r = rightId[b];
			sap.addEdge(l, r + nL, INT_MAX);
		}
	}
	sap.calcMaxFlow(S, T);
	sap.genCut(S);
	for (int i = 0; i < nL; ++i) {
		if (sap.isCut(S, LE[i])) {
			deled[ls[i]] = true;
			del[cnt++] = ls[i];
		}
	}
	for (int i = 0; i < nR; ++i) {
		if (sap.isCut(i + nL, RE[i])) {
			deled[rs[i]] = true;
			del[cnt++] = rs[i];
		}
	}
	for (int i = 0; i < n; ++i) {
		if (!deled[i] && cnt < k) {
			deled[i] = true;
			del[cnt++] = i;
		}
	}
	for (int i = 0; i < cnt; ++i) {
		printf("%d ", del[i] + 1);
	}
	puts("");
}
int main() {
	//freopen("1.in","r",stdin);
	//freopen("1.out","w",stdout);
	cin >> n >> k;
	int t1=clock();
	for (int i = 0; i < n; ++i) {
		scanf("%d%d", x + i, y + i);
		pt[i].x = x[i];
		pt[i].y = y[i];
	}
	if (n - k == 1) {
		for (int i = 1; i < n; ++i) {
			cout << i << " ";
		}
		cout << endl;
		return 0;
	}
	nPs = 0;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			int dx = x[i] - x[j], dy = y[i] - y[j];
			dist[i][j] = dx * dx + dy * dy;
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < i; ++j) {
			ps[nPs++] = (Pair) {i,j,dist[i][j]};
		}
	}
	sort(ps, ps + nPs);
	//printf("sort time=%d\n",clock()-t1);
	int st = nPs;
	for (int i = 0; i < k; ++i) {
		st -= n - 1 - i;
	}
	--st;
	if (st < 0)
		st = 0;
	for (int i = st; i < nPs; i++) {
		if (check(i)) {
			build(i);
			//printf("ans=%d id=%d\n",ps[i].dist,i-st+1);
			//printf("time=%d\n",clock()-t1);
			//system("pause");for (;;);
			return 0;
		}
	}
	//printf("error! time=%d\n",clock()-t1);
	//system("pause");for (;;);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
using namespace std;
const int MAX_N = 1005;
const int MAX_K = 31;
struct Pair {
	int a, b, dist;
	bool operator<(const Pair&o) const {
		return dist < o.dist;
	}
};
int x[MAX_N], y[MAX_N], n, k;
int dist[MAX_N][MAX_N];
Pair ps[MAX_N * MAX_N];
int nPs;
bool used[MAX_N];
const double EPS = 1e-8;
inline int sign(double a) {
	return a < -EPS ? -1 : a > EPS;
}
typedef long long int64;
struct Point {
	int64 x, y;
	Point() {
	}
};
Point pt[MAX_N];
#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
int leftId[MAX_N], rightId[MAX_N];
vector<int> edge[MAX_N];
int pR[MAX_N];
int mark[MAX_N], cur = 0;
bool dfs(int u) {
	if (mark[u] == cur)
		return false;
	mark[u] = cur;
	for (vector<int>::iterator e = edge[u].begin(); e != edge[u].end(); ++e) {
		if (pR[*e] == -1 || dfs(pR[*e]))
			return pR[*e] = u, true;
	}
	return false;
}
bool check(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int bad = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[a][i] <= d && dist[b][i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
			}
		}
	if (bad > k)
		return false;
	//return 0;
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			edge[leftId[a]].push_back(rightId[b]);
		}
	}
	int cnt = 0;
	for (int i = 0; i < nL; ++i) {
		++cur;
		if (dfs(i))
			++cnt;
		if (cnt > k - bad) {
			return false;
		}
	}
	return true;
}
const int INF = INT_MAX / 4;
template<class Flow>
struct Maxflow {
	struct Edge {
		int t;
		Flow c;
		Edge*n, *r;
		Edge(int _t, Flow _c, Edge*_n) :
				t(_t), c(_c), n(_n) {
		}
	};
	vector<Edge*> E;
	int addV() {
		E.push_back((Edge*) 0);
		return E.size() - 1;
	}
	void clear() {
		E.clear();
	}
	Edge* makeEdge(int s, int t, Flow c) {
		return E[s] = new Edge(t, c, E[s]);
	}
	Edge* addEdge(int s, int t, Flow c) {
		Edge*e1 = makeEdge(s, t, c), *e2 = makeEdge(t, s, 0);
		e1->r = e2, e2->r = e1;
		return e1;
	}
	int calcMaxFlow(int vs, int vt) {
		int nV = E.size();
		Flow totalFlow = 0;
		Flow MAX_FLOW = INF;
		vector<Flow> am(nV, 0);
		vector<int> h(nV, 0), cnt(nV + 1, 0);
		vector<Edge*> prev(nV, (Edge*) 0), cur(nV, (Edge*) 0);
		cnt[0] = nV;
		int u = vs;
		Edge*e;
		am[u] = MAX_FLOW;
		while (h[vs] < nV) {
			for (e = cur[u]; e; e = e->n)
				if (e->c > 0 && h[u] == h[e->t] + 1)
					break;
			if (e) {
				int v = e->t;
				cur[u] = prev[v] = e;
				am[v] = min(am[u], e->c);
				u = v;
				if (u == vt) {
					Flow by = am[u];
					while (u != vs) {
						prev[u]->c -= by;
						prev[u]->r->c += by;
						u = prev[u]->r->t;
					}
					totalFlow += by;
					am[u] = MAX_FLOW;
				}
			} else {
				if (!--cnt[h[u]])
					break;
				h[u] = nV;
				for (e = E[u]; e; e = e->n)
					if (e->c > 0 && h[e->t] + 1 < h[u]) {
						h[u] = h[e->t] + 1;
						cur[u] = e;
					}
				++cnt[h[u]];
				if (u != vs)
					u = prev[u]->r->t;
			}
		}
		return totalFlow;
	}
	vector<bool> reach;
	void dfs(int u) {
		if (reach[u])
			return;
		reach[u] = true;
		for (Edge* e = E[u]; e; e = e->n)
			if (e->c > 0)
				dfs(e->t);
	}
	void genCut(int src) {
		reach = vector<bool>(E.size());
		dfs(src);
	}
	~Maxflow() {
		for (int i = 0; i < E.size(); ++i) {
			for (Edge*e = E[i]; e;) {
				Edge*ne = e->n;
				delete e;
				e = ne;
			}
		}
	}
	bool isCut(int s, Edge*e) {
		return reach[s] && !reach[e->t];
	}
};
Maxflow<int> sap;
Maxflow<int>::Edge*LE[MAX_N], *RE[MAX_N];
int ls[MAX_N], rs[MAX_N];
bool deled[MAX_N];
void build(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int cnt = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	memset(deled, false, sizeof deled);
	int del[MAX_N];
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[i][a] <= d && dist[i][b] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) {
					leftId[i] = nL;
					ls[nL++] = i;
				} else {
					rightId[i] = nR;
					rs[nR++] = i;
				}
			} else {
				del[cnt++] = i;
				deled[i] = true;
			}
		}
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	sap.clear();
	for (int i = 0; i < nL; ++i) {
		sap.addV();
	}
	for (int i = 0; i < nR; ++i) {
		sap.addV();
	}
	int S = sap.addV(), T = sap.addV();
	for (int i = 0; i < nL; ++i) {
		LE[i] = sap.addEdge(S, i, 1);
	}
	for (int i = 0; i < nR; ++i) {
		RE[i] = sap.addEdge(i + nL, T, 1);
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			int l = leftId[a], r = rightId[b];
			sap.addEdge(l, r + nL, INT_MAX);
		}
	}
	sap.calcMaxFlow(S, T);
	sap.genCut(S);
	for (int i = 0; i < nL; ++i) {
		if (sap.isCut(S, LE[i])) {
			deled[ls[i]] = true;
			del[cnt++] = ls[i];
		}
	}
	for (int i = 0; i < nR; ++i) {
		if (sap.isCut(i + nL, RE[i])) {
			deled[rs[i]] = true;
			del[cnt++] = rs[i];
		}
	}
	for (int i = 0; i < n; ++i) {
		if (!deled[i] && cnt < k) {
			deled[i] = true;
			del[cnt++] = i;
		}
	}
	for (int i = 0; i < cnt; ++i) {
		printf("%d ", del[i] + 1);
	}
	puts("");
}
int main() {
	//freopen("1.in","r",stdin);
	//freopen("1.out","w",stdout);
	cin >> n >> k;
	int t1=clock();
	for (int i = 0; i < n; ++i) {
		scanf("%d%d", x + i, y + i);
		pt[i].x = x[i];
		pt[i].y = y[i];
	}
	if (n - k == 1) {
		for (int i = 1; i < n; ++i) {
			cout << i << " ";
		}
		cout << endl;
		return 0;
	}
	nPs = 0;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			int dx = x[i] - x[j], dy = y[i] - y[j];
			dist[i][j] = dx * dx + dy * dy;
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < i; ++j) {
			ps[nPs++] = (Pair) {i,j,dist[i][j]};
		}
	}
	sort(ps, ps + nPs);
	//printf("sort time=%d\n",clock()-t1);
	int st = nPs;
	for (int i = 0; i < k; ++i) {
		st -= n - 1 - i;
	}
	--st;
	if (st < 0)
		st = 0;
	for (int i = st; i < nPs; i++) {
		if (check(i)) {
			build(i);
			//printf("ans=%d id=%d\n",ps[i].dist,i-st+1);
			//printf("time=%d\n",clock()-t1);
			//system("pause");for (;;);
			return 0;
		}
	}
	//printf("error! time=%d\n",clock()-t1);
	//system("pause");for (;;);
	return 0;
}


#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <climits>
#include <numeric>
#include <vector>
#include<time.h>
#define foreach(e,x) for(__typeof(x.begin()) e=x.begin();e!=x.end();++e)
#define REP(i,n) for(int i=0;i<n;++i)
#define J (")
using namespace std;
const int MAX_N = 1005;
const int MAX_K = 31;
struct Pair {
	int a, b, dist;
	bool operator<(const Pair&o) const {
		return dist < o.dist;
	}
};
int x[MAX_N], y[MAX_N], n, k;
int dist[MAX_N][MAX_N];
Pair ps[MAX_N * MAX_N];
int nPs;
bool used[MAX_N];
const double EPS = 1e-8;
inline int sign(double a) {
	return a < -EPS ? -1 : a > EPS;
}
typedef long long int64;
struct Point {
	int64 x, y;
	Point() {
	}
};
Point pt[MAX_N];
#define cross(p1,p2,p3) ((p2.x-p1.x)*(p3.y-p1.y)-(p3.x-p1.x)*(p2.y-p1.y))
int leftId[MAX_N], rightId[MAX_N];
vector<int> edge[MAX_N];
int pR[MAX_N];
int mark[MAX_N], cur = 0;
bool dfs(int u) {
	if (mark[u] == cur)
		return false;
	mark[u] = cur;
	for (vector<int>::iterator e = edge[u].begin(); e != edge[u].end(); ++e) {
		if (pR[*e] == -1 || dfs(pR[*e]))
			return pR[*e] = u, true;
	}
	return false;
}
bool check(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int bad = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[a][i] <= d && dist[b][i] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) //left
					leftId[i] = nL++;
				else
					rightId[i] = nR++;
			} else {
				++bad;
				if (bad > k)return false;
			}
		}
	if (bad > k)
		return false;
	//return 0;
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			edge[leftId[a]].push_back(rightId[b]);
		}
	}
	int cnt = 0;
	for (int i = 0; i < nL; ++i) {
		++cur;
		if (dfs(i))
			++cnt;
		if (cnt > k - bad) {
			return false;
		}
	}
	return true;
}
const int INF = INT_MAX / 4;
template<class Flow>
struct Maxflow {
	struct Edge {
		int t;
		Flow c;
		Edge*n, *r;
		Edge(int _t, Flow _c, Edge*_n) :
				t(_t), c(_c), n(_n) {
		}
	};
	vector<Edge*> E;
	int addV() {
		E.push_back((Edge*) 0);
		return E.size() - 1;
	}
	void clear() {
		E.clear();
	}
	Edge* makeEdge(int s, int t, Flow c) {
		return E[s] = new Edge(t, c, E[s]);
	}
	Edge* addEdge(int s, int t, Flow c) {
		Edge*e1 = makeEdge(s, t, c), *e2 = makeEdge(t, s, 0);
		e1->r = e2, e2->r = e1;
		return e1;
	}
	int calcMaxFlow(int vs, int vt) {
		int nV = E.size();
		Flow totalFlow = 0;
		Flow MAX_FLOW = INF;
		vector<Flow> am(nV, 0);
		vector<int> h(nV, 0), cnt(nV + 1, 0);
		vector<Edge*> prev(nV, (Edge*) 0), cur(nV, (Edge*) 0);
		cnt[0] = nV;
		int u = vs;
		Edge*e;
		am[u] = MAX_FLOW;
		while (h[vs] < nV) {
			for (e = cur[u]; e; e = e->n)
				if (e->c > 0 && h[u] == h[e->t] + 1)
					break;
			if (e) {
				int v = e->t;
				cur[u] = prev[v] = e;
				am[v] = min(am[u], e->c);
				u = v;
				if (u == vt) {
					Flow by = am[u];
					while (u != vs) {
						prev[u]->c -= by;
						prev[u]->r->c += by;
						u = prev[u]->r->t;
					}
					totalFlow += by;
					am[u] = MAX_FLOW;
				}
			} else {
				if (!--cnt[h[u]])
					break;
				h[u] = nV;
				for (e = E[u]; e; e = e->n)
					if (e->c > 0 && h[e->t] + 1 < h[u]) {
						h[u] = h[e->t] + 1;
						cur[u] = e;
					}
				++cnt[h[u]];
				if (u != vs)
					u = prev[u]->r->t;
			}
		}
		return totalFlow;
	}
	vector<bool> reach;
	void dfs(int u) {
		if (reach[u])
			return;
		reach[u] = true;
		for (Edge* e = E[u]; e; e = e->n)
			if (e->c > 0)
				dfs(e->t);
	}
	void genCut(int src) {
		reach = vector<bool>(E.size());
		dfs(src);
	}
	~Maxflow() {
		for (int i = 0; i < E.size(); ++i) {
			for (Edge*e = E[i]; e;) {
				Edge*ne = e->n;
				delete e;
				e = ne;
			}
		}
	}
	bool isCut(int s, Edge*e) {
		return reach[s] && !reach[e->t];
	}
};
Maxflow<int> sap;
Maxflow<int>::Edge*LE[MAX_N], *RE[MAX_N];
int ls[MAX_N], rs[MAX_N];
bool deled[MAX_N];
void build(int who) {
	//make all <=i
	int a = ps[who].a, b = ps[who].b, d = ps[who].dist;
	int cnt = 0;
	int nL = 0, nR = 0;
	memset(leftId, -1, sizeof leftId);
	memset(rightId, -1, sizeof rightId);
	memset(deled, false, sizeof deled);
	int del[MAX_N];
	for (int i = 0; i < n; ++i)
		if (i != a && i != b) {
			if (dist[i][a] <= d && dist[i][b] <= d) {
				if (cross(pt[a],pt[b],pt[i]) > 0) {
					leftId[i] = nL;
					ls[nL++] = i;
				} else {
					rightId[i] = nR;
					rs[nR++] = i;
				}
			} else {
				del[cnt++] = i;
				deled[i] = true;
			}
		}
	memset(pR, -1, sizeof pR);
	for (int i = 0; i < nL; ++i) {
		edge[i].clear();
	}
	sap.clear();
	for (int i = 0; i < nL; ++i) {
		sap.addV();
	}
	for (int i = 0; i < nR; ++i) {
		sap.addV();
	}
	int S = sap.addV(), T = sap.addV();
	for (int i = 0; i < nL; ++i) {
		LE[i] = sap.addEdge(S, i, 1);
	}
	for (int i = 0; i < nR; ++i) {
		RE[i] = sap.addEdge(i + nL, T, 1);
	}
	for (int i = who + 1; i < nPs; ++i) {
		if (ps[i].dist > d) {
			int a = ps[i].a, b = ps[i].b;
			if (leftId[a] == -1)
				swap(a, b);
			if (leftId[a] == -1)
				continue;
			if (rightId[b] == -1)
				continue;
			int l = leftId[a], r = rightId[b];
			sap.addEdge(l, r + nL, INT_MAX);
		}
	}
	sap.calcMaxFlow(S, T);
	sap.genCut(S);
	for (int i = 0; i < nL; ++i) {
		if (sap.isCut(S, LE[i])) {
			deled[ls[i]] = true;
			del[cnt++] = ls[i];
		}
	}
	for (int i = 0; i < nR; ++i) {
		if (sap.isCut(i + nL, RE[i])) {
			deled[rs[i]] = true;
			del[cnt++] = rs[i];
		}
	}
	for (int i = 0; i < n; ++i) {
		if (!deled[i] && cnt < k) {
			deled[i] = true;
			del[cnt++] = i;
		}
	}
	for (int i = 0; i < cnt; ++i) {
		printf("%d ", del[i] + 1);
	}
	puts("");
}
int main() {
	//freopen("1.in","r",stdin);
	//freopen("1.out","w",stdout);
	cin >> n >> k;
	int t1=clock();
	for (int i = 0; i < n; ++i) {
		scanf("%d%d", x + i, y + i);
		pt[i].x = x[i];
		pt[i].y = y[i];
	}
	if (n - k == 1) {
		for (int i = 1; i < n; ++i) {
			cout << i << " ";
		}
		cout << endl;
		return 0;
	}
	nPs = 0;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < n; ++j) {
			int dx = x[i] - x[j], dy = y[i] - y[j];
			dist[i][j] = dx * dx + dy * dy;
		}
	}
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < i; ++j) {
			ps[nPs++] = (Pair) {i,j,dist[i][j]};
		}
	}
	sort(ps, ps + nPs);
	//printf("sort time=%d\n",clock()-t1);
	int st = nPs;
	for (int i = 0; i < k; ++i) {
		st -= n - 1 - i;
	}
	--st;
	if (st < 0)
		st = 0;
	for (int i = st; i < nPs; i++) {
		if (check(i)) {
			build(i);
			//printf("ans=%d id=%d\n",ps[i].dist,i-st+1);
			//printf("time=%d\n",clock()-t1);
			//system("pause");for (;;);
			return 0;
		}
	}
	//printf("error! time=%d\n",clock()-t1);
	//system("pause");for (;;);
	return 0;
}


#include<stdio.h>
#include<algorithm>
#include<vector>
using namespace std;
#define fr(i,n) for(int i=0;i<n;i++)
#define fe(i,n) for(__typeof(n.begin()) i=n.begin();i!=n.end();i++)
int p[1000020],c,d[1020][1020];
int n,k,v[1020],x[1020],y[1020];
vector<int>a[1020];
int dfs(int x,int k)
{
	if(x==n)
		return 1;
	if(v[x])
		return dfs(x+1,k);
	fe(i,a[x])
		k-=!v[*i]++;
	int u=k;
	if(k>=0&&dfs(x+1,k))
		return 1;
	fe(i,a[x])
		k+=!--v[*i];
	v[x]=1;
	if(--k>=0&&k>u&&dfs(x+1,k))
		return 1;
	v[x]=0;
	return 0;
}
int ok(int x)
{
	fr(i,n)
		v[i]=0,a[i].clear();
	fr(i,n)
		fr(j,n)
			if(d[i][j]>x)
				a[i].push_back(j);
	return dfs(0,k);
}
int main()
{
	scanf("%d%d",&n,&k);
	fr(i,n)
		scanf("%d%d",x+i,y+i);
	fr(i,n)
		fr(j,i)
			p[c++]=d[i][j]=d[j][i]=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]);
	p[c++]=0;
	sort(p,p+c);
	c=unique(p,p+c)-p;
	int l=-1,r=c,m;
	for(;l<r-1;)
		m=l+r>>1,(ok(p[m])?r:l)=m;
	ok(p[r]);
	fr(i,n)
		if(v[i])
			printf("%d ",i+1),k--;
	fr(i,n)
		if(k&&!v[i])
			printf("%d ",i+1),k--;
	return 0;
}


#include<stdio.h>
#include<algorithm>
#include<vector>
using namespace std;
#define fr(i,n) for(int i=0;i<n;i++)
#define fe(i,n) for(__typeof(n.begin()) i=n.begin();i!=n.end();i++)
int p[1020],c,d[1020][1020];
int n,k,v[1020],x[1020],y[1020];
vector<int>a[1020];
int dfs(int x,int k)
{
	if(x==n)
		return 1;
	if(v[x])
		return dfs(x+1,k);
	fe(i,a[x])
		k-=!v[*i]++;
	int u=k;
	if(k>=0&&dfs(x+1,k))
		return 1;
	fe(i,a[x])
		k+=!--v[*i];
	v[x]=1;
	if(--k>=0&&k>u&&dfs(x+1,k))
		return 1;
	v[x]=0;
	return 0;
}
int ok(int x)
{
	fr(i,n)
		v[i]=0,a[i].clear();
	fr(i,n)
		fr(j,n)
			if(d[i][j]>x)
				a[i].push_back(j);
	return dfs(0,k);
}
int main()
{
	scanf("%d%d",&n,&k);
	fr(i,n)
		scanf("%d%d",x+i,y+i);
	fr(i,n)
		fr(j,i)
			p[c++]=d[i][j]=d[j][i]=(x[i]-x[j])*(x[i]-x[j])+(y[i]-y[j])*(y[i]-y[j]);
	p[c++]=0;
	sort(p,p+c);
	c=unique(p,p+c)-p;
	int l=-1,r=c,m;
	for(;l<r-1;)
		m=l+r>>1,(ok(p[m])?r:l)=m;
	ok(p[r]);
	fr(i,n)
		if(v[i])
			printf("%d ",i+1),k--;
	fr(i,n)
		if(k&&!v[i])
			printf("%d ",i+1),k--;
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <cctype>
#include <ctime>
#include <cstring>
#include <cmath>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <map>
#include <sstream>
#include <algorithm>
#include <vector>
#define mp make_pair
#define pb push_back
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define taskname "d"
#define sqr(a) ((a) * (a))
using namespace std;

const int N = 1000;
int ans[N], used[N], deg[N], n, k, l, r, q, cur, x[N], y[N], dist[N][N];
vector<int> d, adj[N];

void destroy(int v) {
	used[v]++;
	if (used[v] != 1) return;
	ans[cur++] = v;
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]--;
			deg[v]--;
		}
}

void undestroy(int v) {
	used[v]--;
	if (used[v] != 0) return;
	assert(ans[--cur] == v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]++;
			deg[v]++;
		}
}

bool go(int i) {
	if (cur > k) return false;
	if (i == n) {
		for (int j = 0; j < n; ++j)
			if (!used[j]) ans[cur++] = j;
		return true;
	}
	if (deg[i] == 0)
		return go(i + 1);
	else {
		if (deg[i] != 1) {
			destroy(i);
			if (go(i + 1)) return true;
			undestroy(i);
		}

		for (int j = 0; j < sz(adj[i]); ++j)
			destroy(adj[i][j]);
		if (go(i + 1)) return true;
		for (int j = sz(adj[i]) - 1; j >= 0; --j)
			undestroy(adj[i][j]);
		return false;
	}
}

bool check(int limit) {
	for (int i = 0; i < n; ++i) {
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (dist[i][j] > limit) adj[i].pb(j);
		deg[i] = sz(adj[i]), used[i] = false;
	}
	cur = 0;
	while (true) {
		bool ok = false;
		for (int i = 0; i < n; ++i)
			if (deg[i] == 1)
				for (int j = 0; j < sz(adj[i]); ++j)
					if (!used[adj[i][j]]) {
						destroy(adj[i][j]);
						ok = true;
						break;
					}
		if (!ok) break;
	}
	return (cur > k) ? false : go(0);
}

int main() {
	//freopen(taskname".in", "r", stdin);
	//freopen(taskname".out", "w", stdout);
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j) {
			dist[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
			d.pb(dist[i][j]);
		}
	sort(d.begin(), d.end());
	d.resize(unique(d.begin(), d.end()) - d.begin());
	int l = 0, r = sz(d) - 1;
	while (l < r) {
		q = (l + r) / 2;
		if (check(d[q]))
			r = q;
		else
			l = q + 1;
	}
	assert(check(d[r]));
	for (int i = 0; i < k; ++i)
		printf("%d%c", ans[i] + 1, " \n"[i == k - 1]);
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <cctype>
#include <ctime>
#include <cstring>
#include <cmath>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <map>
#include <sstream>
#include <algorithm>
#include <vector>
#define mp make_pair
#define pb push_back
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define taskname "d"
#define sqr(a) ((a) * (a))
using namespace std;

const int N = 1000;
int ans[N], used[N], deg[N], n, k, l, r, q, cur, x[N], y[N], dist[N][N];
vector<int> d, adj[N];

void destroy(int v) {
	used[v]++;
	if (used[v] != 1) return;
	ans[cur++] = v;
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]--;
			deg[v]--;
		}
}

void undestroy(int v) {
	used[v]--;
	if (used[v] != 0) return;
	assert(ans[--cur] == v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]++;
			deg[v]++;
		}
}

bool go(int i) {
	if (cur > k) return false;
	if (i == n) {
		for (int j = 0; j < n; ++j)
			if (!used[j]) ans[cur++] = j;
		return true;
	}
	if (deg[i] == 0)
		return go(i + 1);
	else {
		if (deg[i] != 1) {
			destroy(i);
			if (go(i + 1)) return true;
			undestroy(i);
		}
		for (int j = 0; j < sz(adj[i]); ++j)
			destroy(adj[i][j]);
		if (go(i + 1)) return true;
		for (int j = sz(adj[i]) - 1; j >= 0; --j)
			undestroy(adj[i][j]);
		return false;
	}
}

bool check(int limit) {
	for (int i = 0; i < n; ++i) {
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (dist[i][j] > limit) adj[i].pb(j);
		deg[i] = sz(adj[i]), used[i] = false;
	}
	cur = 0;
	return go(0);
}

int main() {
	//freopen(taskname".in", "r", stdin);
	//freopen(taskname".out", "w", stdout);
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j) {
			dist[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
			d.pb(dist[i][j]);
		}
	sort(d.begin(), d.end());
	d.resize(unique(d.begin(), d.end()) - d.begin());
	int l = 0, r = sz(d) - 1;
	while (l < r) {
		q = (l + r) / 2;
		if (check(d[q]))
			r = q;
		else
			l = q + 1;
	}
	assert(check(d[r]));
	for (int i = 0; i < k; ++i)
		printf("%d%c", ans[i] + 1, " \n"[i == k - 1]);
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <cctype>
#include <ctime>
#include <cstring>
#include <cmath>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <map>
#include <sstream>
#include <algorithm>
#include <vector>
#define mp make_pair
#define pb push_back
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define taskname "d"
#define sqr(a) ((a) * (a))
using namespace std;

const int N = 1000;
int ans[N], used[N], deg[N], n, k, l, r, q, cur, x[N], y[N], dist[N][N];
vector<int> d, adj[N];

void destroy(int v) {
	used[v]++;
	if (used[v] != 1) return;
	ans[cur++] = v;
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]--;
			deg[v]--;
		}
}

void undestroy(int v) {
	used[v]--;
	if (used[v] != 0) return;
	assert(ans[--cur] == v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]++;
			deg[v]++;
		}
}

bool go(int i) {
	if (cur > k) return false;
	if (i == n) {
		for (int j = 0; j < n; ++j)
			if (!used[j]) ans[cur++] = j;
		return true;
	}
	if (deg[i] == 0)
		return go(i + 1);
	else {
		destroy(i);
		if (go(i + 1)) return true;
		undestroy(i);

		for (int j = 0; j < sz(adj[i]); ++j)
			destroy(adj[i][j]);
		if (go(i + 1)) return true;
		for (int j = sz(adj[i]) - 1; j >= 0; --j)
			undestroy(adj[i][j]);
		return false;
	}
}

bool check(int limit) {
	for (int i = 0; i < n; ++i) {
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (dist[i][j] > limit) adj[i].pb(j);
		deg[i] = sz(adj[i]), used[i] = false;
	}
	cur = 0;
	while (true) {
		bool ok = false;
		for (int i = 0; i < n; ++i)
			if (deg[i] == 1)
				for (int j = 0; j < sz(adj[i]); ++j)
					if (!used[adj[i][j]]) {
						destroy(adj[i][j]);
						ok = true;
						break;
					}
		if (!ok) break;
	}
	return (cur > k) ? false : go(0);
}

int main() {
	//freopen(taskname".in", "r", stdin);
	//freopen(taskname".out", "w", stdout);
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j) {
			dist[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
			d.pb(dist[i][j]);
		}
	sort(d.begin(), d.end());
	d.resize(unique(d.begin(), d.end()) - d.begin());
	int l = 0, r = sz(d) - 1;
	while (l < r) {
		q = (l + r) / 2;
		if (check(d[q]))
			r = q;
		else
			l = q + 1;
	}
	assert(check(d[r]));
	for (int i = 0; i < k; ++i)
		printf("%d%c", ans[i] + 1, " \n"[i == k - 1]);
	return 0;
}


#pragma comment(linker, "/STACK:100000000")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
using namespace std;
#define int64 long long
#define ldb long double
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define taskname "task_d"
const ldb pi = acos(-1.0);

const int N = 1111;
const int INF = (int) 2.1e9;
vector<int> adj[N], cur, v;
int d[N][N], x[N], y[N], deg[N], n, k;
bool used[N], dfsused[N];

struct cmp_deg {
	bool operator()(const int& i, const int& j) {
		return (mp(-deg[i], i) < mp(-deg[j], j));
	}
};

set<int, cmp_deg> s;

int sqr(int x) {
	return x * x;
}

void kill(int v, bool doit) {
	int delta = doit ? -1 : 1;
	if (doit) {
		s.erase(v);
		used[v] = true;
	}
	for (int i = 0; i < sz(adj[v]); ++i) {
		if (!used[adj[v][i]]) s.erase(adj[v][i]);
		deg[adj[v][i]] += delta;
		if (!used[adj[v][i]]) s.insert(adj[v][i]);
	}
	if (!doit) {
		s.insert(v);
		used[v] = false;
	}
}

void dfs(int v) {
	dfsused[v] = true;
	cur.pb(v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!dfsused[adj[v][i]])
			dfs(adj[v][i]);
}

bool checkone(int have) {
	for (int i = 0; i < n; ++i)
		dfsused[i] = used[i];
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (!dfsused[i]) {
			cur.clear();
			dfs(i);
			int start = (find(adj[i].begin(), adj[i].end(), cur.back()) != adj[i].end()) ? 0 : 1;
			for (int j = start; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < sz(v); ++i)
		used[v[i]] = true;
	return true;
}

bool go(int have) {
	int v = *s.begin(), vdeg = deg[v];
	if (vdeg <= 0) return true;
	if (have == 0) return false;
	if (vdeg <= 2) return checkone(have);
	// me
	kill(v, true);
	if (go(have - 1)) return true;
	kill(v, false);
	if (vdeg > have) return false;
	// others
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], true);
	if (go(have - vdeg)) return true;
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], false);
	return false;
}

bool check(int q) {
	s.clear();
	v.clear();
	for (int i = 0; i < n; ++i) {
		used[i] = false;
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (d[i][j] > q)
				adj[i].pb(j);
		deg[i] = sz(adj[i]);
		s.insert(i);
	}
	return go(k);
}

int main() {
//	assert(freopen(taskname".in", "r", stdin));
//	assert(freopen(taskname".out", "w", stdout));
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			d[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
	int l = -1, r = INF;
	while (l + 1 < r) {
		int q = (l + (int64) r) / 2;
		(check(q) ? r : l) = q;
	}
	assert(check(r));
	//eprintf("%d\n", r);
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (used[i])
			v.pb(i);
	for (int i = 0; i < n; ++i)
		if (!used[i] && (sz(v) < k))
			v.pb(i);
	for (int i = 0; i < sz(v); ++i)
		printf("%d%c", v[i] + 1, " \n"[i == sz(v) - 1]);
	return 0;
}


#pragma comment(linker, "/STACK:100000000")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
using namespace std;
#define int64 long long
#define ldb long double
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define taskname "task_d"
const ldb pi = acos(-1.0);

const int N = 1111;
const int INF = (int) 2.1e9;
vector<int> adj[N], cur, v;
int d[N][N], x[N], y[N], deg[N], n, k;
bool used[N], dfsused[N];

struct cmp_deg {
	bool operator()(const int& i, const int& j) {
		return (mp(-deg[i], i) < mp(-deg[j], j));
	}
};

set<int, cmp_deg> s;

int sqr(int x) {
	return x * x;
}

void kill(int v, bool doit) {
	int delta = doit ? -1 : 1;
	if (doit) {
		s.erase(v);
		used[v] = true;
	}
	for (int i = 0; i < sz(adj[v]); ++i) {
		if (!used[adj[v][i]]) s.erase(adj[v][i]);
		deg[adj[v][i]] += delta;
		if (!used[adj[v][i]]) s.insert(adj[v][i]);
	}
	if (!doit) {
		s.insert(v);
		used[v] = false;
	}
}

void dfs(int v) {
	dfsused[v] = true;
	cur.pb(v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!dfsused[adj[v][i]])
			dfs(adj[v][i]);
}

bool checkone(int have) {
	for (int i = 0; i < n; ++i)
		dfsused[i] = used[i];
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (!dfsused[i] && (deg[i] == 1)) {
			cur.clear();
			dfs(i);
			int start = (find(adj[i].begin(), adj[i].end(), cur.back()) != adj[i].end()) ? 0 : 1;
			for (int j = start; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < n; ++i)
		if (!dfsused[i]) {
			cur.clear();
			dfs(i);
			int start = (find(adj[i].begin(), adj[i].end(), cur.back()) != adj[i].end()) ? 0 : 1;
			for (int j = start; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < sz(v); ++i)
		used[v[i]] = true;
	return true;
}

bool go(int have) {
	int v = *s.begin(), vdeg = deg[v];
	if (vdeg <= 0) return true;
	if (have == 0) return false;
	if (vdeg <= 2) return checkone(have);
	// me
	kill(v, true);
	if (go(have - 1)) return true;
	kill(v, false);
	if (vdeg > have) return false;
	// others
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], true);
	if (go(have - vdeg)) return true;
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], false);
	return false;
}

bool check(int q) {
	s.clear();
	v.clear();
	for (int i = 0; i < n; ++i) {
		used[i] = false;
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (d[i][j] > q)
				adj[i].pb(j);
		deg[i] = sz(adj[i]);
		s.insert(i);
	}
	return go(k);
}

int main() {
//	assert(freopen(taskname".in", "r", stdin));
//	assert(freopen(taskname".out", "w", stdout));
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			d[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
	int l = -1, r = INF;
	while (l + 1 < r) {
		int q = (l + (int64) r) / 2;
		(check(q) ? r : l) = q;
	}
	assert(check(r));
	//eprintf("%d\n", r);
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (used[i])
			v.pb(i);
	for (int i = 0; i < n; ++i)
		if (!used[i] && (sz(v) < k))
			v.pb(i);
	for (int i = 0; i < sz(v); ++i)
		printf("%d%c", v[i] + 1, " \n"[i == sz(v) - 1]);
	return 0;
}


#pragma comment(linker, "/STACK:100000000")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
using namespace std;
#define int64 long long
#define ldb long double
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define taskname "task_d"
const ldb pi = acos(-1.0);

const int N = 1111;
const int INF = (int) 2.1e9;
vector<int> adj[N], cur, v;
int d[N][N], x[N], y[N], deg[N], n, k;
bool used[N], dfsused[N];

struct cmp_deg {
	bool operator()(const int& i, const int& j) {
		return (mp(-deg[i], i) < mp(-deg[j], j));
	}
};

set<int, cmp_deg> s;

int sqr(int x) {
	return x * x;
}

void kill(int v, bool doit) {
	int delta = doit ? -1 : 1;
	if (doit) {
		s.erase(v);
		used[v] = true;
	}
	for (int i = 0; i < sz(adj[v]); ++i) {
		if (!used[adj[v][i]]) s.erase(adj[v][i]);
		deg[adj[v][i]] += delta;
		if (!used[adj[v][i]]) s.insert(adj[v][i]);
	}
	if (!doit) {
		s.insert(v);
		used[v] = false;
	}
}

void dfs(int v) {
	dfsused[v] = true;
	cur.pb(v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!dfsused[adj[v][i]])
			dfs(adj[v][i]);
}

bool checkone(int have) {
	for (int i = 0; i < n; ++i)
		dfsused[i] = used[i];
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (!dfsused[i] && (deg[i] == 1)) {
			cur.clear();
			dfs(i);
			for (int j = 1; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < n; ++i)
		if (!dfsused[i]) {
			cur.clear();
			dfs(i);
			for (int j = 0; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < sz(v); ++i)
		used[v[i]] = true;
	return true;
}

bool go(int have) {
	int v = *s.begin(), vdeg = deg[v];
	if (vdeg <= 0) return true;
	if (have == 0) return false;
	if (vdeg <= 2) return checkone(have);
	// me
	kill(v, true);
	if (go(have - 1)) return true;
	kill(v, false);
	if (vdeg > have) return false;
	// others
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], true);
	if (go(have - vdeg)) return true;
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], false);
	return false;
}

bool check(int q) {
	s.clear();
	v.clear();
	for (int i = 0; i < n; ++i) {
		used[i] = false;
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (d[i][j] > q)
				adj[i].pb(j);
		deg[i] = sz(adj[i]);
		s.insert(i);
	}
	return go(k);
}

int main() {
//	assert(freopen(taskname".in", "r", stdin));
//	assert(freopen(taskname".out", "w", stdout));
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			d[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
	int l = -1, r = INF;
	while (l + 1 < r) {
		int q = (l + (int64) r) / 2;
		(check(q) ? r : l) = q;
	}
	assert(check(r));
	//eprintf("%d\n", r);
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (used[i])
			v.pb(i);
	for (int i = 0; i < n; ++i)
		if (!used[i] && (sz(v) < k))
			v.pb(i);
	for (int i = 0; i < sz(v); ++i)
		printf("%d%c", v[i] + 1, " \n"[i == sz(v) - 1]);
	return 0;
}


#pragma comment(linker, "/STACK:100000000")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
using namespace std;
#define int64 long long
#define ldb long double
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define taskname "task_d"
const ldb pi = acos(-1.0);

const int N = 1111;
const int INF = (int) 2.1e9;
vector<int> adj[N], cur, v;
int d[N][N], x[N], y[N], deg[N], n, k;
bool used[N], dfsused[N];

struct cmp_deg {
	bool operator()(const int& i, const int& j) {
		return (mp(-deg[i], i) < mp(-deg[j], j));
	}
};

set<int, cmp_deg> s;

int sqr(int x) {
	return x * x;
}

void kill(int v, bool doit) {
	int delta = doit ? -1 : 1;
	if (doit) {
		s.erase(v);
		used[v] = true;
	}
	for (int i = 0; i < sz(adj[v]); ++i) {
		if (!used[adj[v][i]]) s.erase(adj[v][i]);
		deg[adj[v][i]] += delta;
		if (!used[adj[v][i]]) s.insert(adj[v][i]);
	}
	if (!doit) {
		s.insert(v);
		used[v] = false;
	}
}

void dfs(int v) {
	dfsused[v] = true;
	cur.pb(v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!dfsused[adj[v][i]])
			dfs(adj[v][i]);
}

bool checkone(int have) {
	for (int i = 0; i < n; ++i)
		dfsused[i] = used[i];
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (!dfsused[i] && (deg[i] <= 1)) {
			cur.clear();
			dfs(i);
			for (int j = 1; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < n; ++i)
		if (!dfsused[i]) {
			cur.clear();
			dfs(i);
			for (int j = 0; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < sz(v); ++i)
		used[v[i]] = true;
	return true;
}

bool go(int have) {
	int v = *s.begin(), vdeg = deg[v];
	if (vdeg <= 0) return true;
	if (have == 0) return false;
	if (vdeg <= 2) return checkone(have);
	// me
	kill(v, true);
	if (go(have - 1)) return true;
	kill(v, false);
	if (vdeg > have) return false;
	// others
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], true);
	if (go(have - vdeg)) return true;
	for (int i = 0; i < sz(adj[v]); ++i)
		kill(adj[v][i], false);
	return false;
}

bool check(int q) {
	s.clear();
	v.clear();
	for (int i = 0; i < n; ++i) {
		used[i] = false;
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (d[i][j] > q)
				adj[i].pb(j);
		deg[i] = sz(adj[i]);
		s.insert(i);
	}
	return go(k);
}

int main() {
//	assert(freopen(taskname".in", "r", stdin));
//	assert(freopen(taskname".out", "w", stdout));
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			d[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
	int l = -1, r = INF;
	while (l + 1 < r) {
		int q = (l + (int64) r) / 2;
		(check(q) ? r : l) = q;
	}
	assert(check(r));
	eprintf("%d\n", r);
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (used[i])
			v.pb(i);
	for (int i = 0; i < n; ++i)
		if (!used[i] && (sz(v) < k))
			v.pb(i);
	for (int i = 0; i < sz(v); ++i)
		printf("%d%c", v[i] + 1, " \n"[i == sz(v) - 1]);
	return 0;
}


#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <cctype>
#include <ctime>
#include <cstring>
#include <cmath>
#include <string>
#include <map>
#include <set>
#include <iostream>
#include <map>
#include <sstream>
#include <algorithm>
#include <vector>
#define mp make_pair
#define pb push_back
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define taskname "d"
#define sqr(a) ((a) * (a))
using namespace std;

const int N = 1000;
int ans[N], used[N], deg[N], n, k, l, r, q, cur, x[N], y[N], dist[N][N];
vector<int> d, adj[N];

void destroy(int v) {
	used[v]++;
	if (used[v] != 1) return;
	ans[cur++] = v;
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]--;
			deg[v]--;
		}
}

void undestroy(int v) {
	used[v]--;
	if (used[v] != 0) return;
	assert(ans[--cur] == v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			deg[adj[v][i]]++;
			deg[v]++;
		}
}

bool go(int i) {
	if (cur > k) return false;
	if (i == n) {
		for (int j = 0; j < n; ++j)
			if (!used[j]) ans[cur++] = j;
		return true;
	}
	if (deg[i] == 0)
		return go(i + 1);
	else {
		if (deg[i] != 1) {
			destroy(i);
			if (go(i + 1)) return true;
			undestroy(i);
		}
		for (int j = 0; j < sz(adj[i]); ++j)
			destroy(adj[i][j]);
		if (go(i + 1)) return true;
		for (int j = sz(adj[i]) - 1; j >= 0; --j)
			undestroy(adj[i][j]);
		return false;
	}
}

bool check(int limit) {
	for (int i = 0; i < n; ++i) {
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (dist[i][j] > limit) adj[i].pb(j);
		deg[i] = sz(adj[i]), used[i] = false;
	}
	return go(0);
}

int main() {
	//freopen(taskname".in", "r", stdin);
	//freopen(taskname".out", "w", stdout);
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j) {
			dist[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
			d.pb(dist[i][j]);
		}
	sort(d.begin(), d.end());
	d.resize(unique(d.begin(), d.end()) - d.begin());
	int l = 0, r = sz(d) - 1;
	while (l < r) {
		q = (l + r) / 2;
		if (check(d[q]))
			r = q;
		else
			l = q + 1;
	}
	assert(check(d[r]));
	for (int i = 0; i < k; ++i)
		printf("%d%c", ans[i] + 1, " \n"[i == k - 1]);
	return 0;
}


#pragma comment(linker, "/STACK:100000000")
#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cctype>
#include <cmath>
#include <ctime>
#include <string>
#include <map>
#include <set>
#include <vector>
#include <queue>
#include <algorithm>
#include <iostream>
using namespace std;
#define int64 long long
#define ldb long double
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define sz(a) ((int) (a).size())
#define eprintf(...) fprintf(stderr, __VA_ARGS__)
#define taskname "task_d"
const ldb pi = acos(-1.0);

const int N = 1111;
const int INF = (int) 2.1e9;
vector<int> adj[N], cur, v;
int d[N][N], x[N], y[N], deg[N], n, k;
bool used[N], dfsused[N];

struct cmp_deg {
	bool operator()(const int& i, const int& j) {
		return (mp(-deg[i], i) < mp(-deg[j], j));
	}
};

set<int, cmp_deg> s;

int sqr(int x) {
	return x * x;
}

void kill(int v, bool doit) {
	int delta = doit ? -1 : 1;
	if (doit) {
		s.erase(v);
		used[v] = true;
	}
	for (int i = 0; i < sz(adj[v]); ++i) {
		if (!used[adj[v][i]]) s.erase(adj[v][i]);
		deg[adj[v][i]] += delta;
		if (!used[adj[v][i]]) s.insert(adj[v][i]);
	}
	if (!doit) {
		s.insert(v);
		used[v] = false;
	}
}

void dfs(int v) {
	dfsused[v] = true;
	cur.pb(v);
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!dfsused[adj[v][i]])
			dfs(adj[v][i]);
}

bool checkone(int have) {
	for (int i = 0; i < n; ++i)
		dfsused[i] = used[i];
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (!dfsused[i] && (deg[i] <= 1)) {
			cur.clear();
			dfs(i);
			for (int j = 1; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < n; ++i)
		if (!dfsused[i]) {
			cur.clear();
			dfs(i);
			for (int j = 0; j < sz(cur); j += 2)
				v.pb(cur[j]);
			if (sz(v) > have) return false;
		}
	for (int i = 0; i < sz(v); ++i)
		used[v[i]] = true;
	return true;
}

bool go(int have) {
	int v = *s.begin(), vdeg = deg[v];
	if (vdeg <= 0) return true;
	if (have == 0) return false;
	if (vdeg <= 2) return checkone(have);
	// me
	kill(v, true);
	if (go(have - 1)) return true;
	kill(v, false);
	if (vdeg > have) return false;
	// others
	vector<int> BE;
	for (int i = 0; i < sz(adj[v]); ++i)
		if (!used[adj[v][i]]) {
			kill(adj[v][i], true);
			BE.pb(adj[v][i]);
		}
	if (go(have - vdeg)) return true;
	for (int i = 0; i < sz(BE); ++i)
		kill(BE[i], false);
	return false;
}

bool check(int q) {
	s.clear();
	v.clear();
	for (int i = 0; i < n; ++i) {
		used[i] = false;
		adj[i].clear();
		for (int j = 0; j < n; ++j)
			if (d[i][j] > q)
				adj[i].pb(j);
		deg[i] = sz(adj[i]);
		s.insert(i);
	}
	return go(k);
}

int main() {
//	assert(freopen(taskname".in", "r", stdin));
//	assert(freopen(taskname".out", "w", stdout));
	scanf("%d%d", &n, &k);
	for (int i = 0; i < n; ++i)
		scanf("%d%d", &x[i], &y[i]);
	for (int i = 0; i < n; ++i)
		for (int j = 0; j < n; ++j)
			d[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
	int l = -1, r = INF;
	while (l + 1 < r) {
		int q = (l + (int64) r) / 2;
		(check(q) ? r : l) = q;
	}
	assert(check(r));
	eprintf("%d\n", r);
	vector<int> v;
	for (int i = 0; i < n; ++i)
		if (used[i])
			v.pb(i);
	for (int i = 0; i < n; ++i)
		if (!used[i] && (sz(v) < k))
			v.pb(i);
	for (int i = 0; i < sz(v); ++i)
		printf("%d%c", v[i] + 1, " \n"[i == sz(v) - 1]);
	return 0;
}


#include <bits/stdc++.h>
const int N = 1010, M = 2 * N * N;
long long sqr(long long a)
{
	return a*a;
}
int n, k, l;
int x[N], y[N], d[N][N], c[N], son[N], ed[M], next[M];
bool dfs(int x, int k)
{
    if (x > n) return 1;
    if (c[x]) return dfs(x + 1, k);
    for (int p = son[x]; p; p = next[p])
		k -= !c[ed[p]]++;
    if (k >= 0 && dfs(x + 1, k))
		return 1;
    c[x] = 1;
    int tmp = k;
    for (int p = son[x]; p; p = next[p])
		k += !--c[ed[p]];
    if (--k >= 0 && k > tmp && dfs(x + 1, k))
		return 1;
    c[x] = 0;
    return 0;
}
bool check(long long mid)
{
    memset(c, 0, sizeof(c)), memset(son, 0, sizeof(son)), l = 0;
    for (int i = 1; i <= n; i++)
		for (int j = 1; j <= n; j++)
			if (d[i][j] > mid) {
                ed[++l] = j;
				next[l] = son[i];
				son[i] = l;
			}
    return dfs(1, k);
}
int main()
{
    scanf("%d%d", &n, &k);
    long long l = 0, mid, r = 1ll << 31;
    for (int i = 1; i <= n; i++) scanf("%d%d", &x[i], &y[i]);
    for (int i = 1; i <= n; i++)
		for (int j = 1; j <= n; j++)
			d[i][j] = sqr(x[i] - x[j]) + sqr(y[i] - y[j]);
    while (l + 1 < r) {
		mid = (l + r) >> 1;
		if (check(mid)) r = mid;
		else l = mid;
	}
    check(r);
    for (int i = 1; i <= n && k; i++)
		if (c[i])
			printf("%d%s", i, --k ? " " : "\n");
    for (int i = 1; i <= n && k; i++)
		if (!c[i])
			printf("%d%s", i, --k ? " " : "\n");
    return 0;
}


#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cstring>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

#define SIZE(x) (int((x).size()))
#define rep(i,l,r) for (int i=(l); i<=(r); i++)
#define repd(i,r,l) for (int i=(r); i>=(l); i--)
#define rept(i,c) for (typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)

#ifndef ONLINE_JUDGE
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }
#else
#define debug(x) {}
#endif

#define maxn 1010

struct edge
{
	int a,b; LL wg;
	edge() {}
	edge(int a, int b, LL wg): a(a), b(b), wg(wg) {}
};

edge ve[500010];

int cmp(const edge &a, const edge &b)
{
	return a.wg>b.wg;
}

int n,m;
int c[maxn], used;
vector<int> e[maxn];

inline void put(int x)
{
	if (!c[x]) used++;
	c[x]++;
}

inline void rm(int x)
{
	c[x]--;
	if (!c[x]) used--;
}

int dfs(int cur)
{
	if (used>m) return 0;
	if (cur>n) return 1;
	if (e[cur].empty() || c[cur]) return dfs(cur+1);
	int z=0;
	rept(it,e[cur]) if (!c[*it]) z++;
	if (z>1)
	{
		put(cur);
		if (dfs(cur+1)) return 1;
		rm(cur);
	}
	rept(it,e[cur]) put(*it);
	if (dfs(cur+1)) return 1;
	rept(it,e[cur]) rm(*it);
	return 0;
}

int check(int s)
{
	rep(i,1,n) e[i].clear();
	rep(i,1,s) e[ve[i].a].push_back(ve[i].b), e[ve[i].b].push_back(ve[i].a);
	memset(c,0,sizeof c); used=0;
	return dfs(1);
}

struct point
{
	int x,y;
};
point p[maxn];

void lemon()
{
	scanf("%d%d",&n,&m);
	rep(i,1,n) scanf("%d%d",&p[i].x,&p[i].y);
	int cn=0; rep(i,1,n) rep(j,i+1,n) ve[++cn]=edge(i,j,LL(p[i].x-p[j].x)*(p[i].x-p[j].x)+LL(p[i].y-p[j].y)*(p[i].y-p[j].y));
	sort(ve+1,ve+cn+1,cmp);
	int left=1, right=cn;
	while (left!=right)
	{
		int mid=(left+right+1)/2;
		if (check(mid)) left=mid; else right=mid-1;
	}
	check(left);
	rep(i,1,n)
		if (c[i] || used<m)
		{
			printf("%d ",i);
			if (!c[i]) used++;
		}
	printf("\n");
}

int main()
{
	ios::sync_with_stdio(true);
	#ifndef ONLINE_JUDGE
		freopen("164D.in","r",stdin);
	#endif
	lemon();
	return 0;
}


#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cstring>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

#define SIZE(x) (int((x).size()))
#define rep(i,l,r) for (int i=(l); i<=(r); i++)
#define repd(i,r,l) for (int i=(r); i>=(l); i--)
#define rept(i,c) for (typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)

#ifndef ONLINE_JUDGE
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }
#else
#define debug(x) {}
#endif

#define maxn 1010

struct edge
{
	int a,b; LL wg;
	edge() {}
	edge(int a, int b, LL wg): a(a), b(b), wg(wg) {}
};

edge ve[500010];

int cmp(const edge &a, const edge &b)
{
	return a.wg>b.wg;
}

int n,m;
int c[maxn], used;
vector<int> e[maxn];

inline void put(int x)
{
	if (!c[x]) used++;
	c[x]++;
}

inline void rm(int x)
{
	c[x]--;
	if (!c[x]) used--;
}

int dfs(int cur)
{
	if (used>m) return 0;
	if (cur>n) return 1;
	if (e[cur].empty() || c[cur]) return dfs(cur+1);
	int z=1;
	rept(it,e[cur]) if (!c[*it]) z++;
	if (z>1)
	{
		put(cur);
		if (dfs(cur+1)) return 1;
		rm(cur);
	}
	rept(it,e[cur]) put(*it);
	if (dfs(cur+1)) return 1;
	rept(it,e[cur]) rm(*it);
	return 0;
}

int check(int s)
{
	rep(i,1,n) e[i].clear();
	rep(i,1,s) e[ve[i].a].push_back(ve[i].b), e[ve[i].b].push_back(ve[i].a);
	memset(c,0,sizeof c); used=0;
	return dfs(1);
}

struct point
{
	int x,y;
};
point p[maxn];

void lemon()
{
	scanf("%d%d",&n,&m);
	rep(i,1,n) scanf("%d%d",&p[i].x,&p[i].y);
	int cn=0; rep(i,1,n) rep(j,i+1,n) ve[++cn]=edge(i,j,LL(p[i].x-p[j].x)*(p[i].x-p[j].x)+LL(p[i].y-p[j].y)*(p[i].y-p[j].y));
	sort(ve+1,ve+cn+1,cmp);
	int left=1, right=cn;
	while (left!=right)
	{
		int mid=(left+right+1)/2;
		if (check(mid)) left=mid; else right=mid-1;
	}
	check(left);
	rep(i,1,n)
		if (c[i] || used<m)
		{
			printf("%d ",i);
			if (!c[i]) used++;
		}
	printf("\n");
}

int main()
{
	ios::sync_with_stdio(true);
	#ifndef ONLINE_JUDGE
		freopen("164D.in","r",stdin);
	#endif
	lemon();
	return 0;
}


#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <cstring>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;

#define SIZE(x) (int((x).size()))
#define rep(i,l,r) for (int i=(l); i<=(r); i++)
#define repd(i,r,l) for (int i=(r); i>=(l); i--)
#define rept(i,c) for (typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)

#ifndef ONLINE_JUDGE
#define debug(x) { cerr<<#x<<" = "<<(x)<<endl; }
#else
#define debug(x) {}
#endif

#define maxn 1010

struct edge
{
	int a,b; LL wg;
	edge() {}
	edge(int a, int b, LL wg): a(a), b(b), wg(wg) {}
};

edge ve[500010];

int cmp(const edge &a, const edge &b)
{
	return a.wg>b.wg;
}

int n,m;
int c[maxn], used;
vector<int> e[maxn];

inline void put(int x)
{
	if (!c[x]) used++;
	c[x]++;
}

inline void rm(int x)
{
	c[x]--;
	if (!c[x]) used--;
}

int dfs(int cur)
{
	if (used>m) return 0;
	if (cur>n) return 1;
	if (e[cur].empty() || c[cur]) return dfs(cur+1);
	int z=1;
	rept(it,e[cur]) if (!c[*it]) { z=0; break; }
	if (SIZE(e[cur])>1 && !z)
	{
		put(cur);
		if (dfs(cur+1)) return 1;
		rm(cur);
	}
	rept(it,e[cur]) put(*it);
	if (dfs(cur+1)) return 1;
	rept(it,e[cur]) rm(*it);
	return 0;
}

int check(int s)
{
	rep(i,1,n) e[i].clear();
	rep(i,1,s) e[ve[i].a].push_back(ve[i].b), e[ve[i].b].push_back(ve[i].a);
	memset(c,0,sizeof c); used=0;
	return dfs(1);
}

struct point
{
	int x,y;
};
point p[maxn];

void lemon()
{
	scanf("%d%d",&n,&m);
	rep(i,1,n) scanf("%d%d",&p[i].x,&p[i].y);
	int cn=0; rep(i,1,n) rep(j,i+1,n) ve[++cn]=edge(i,j,LL(p[i].x-p[j].x)*(p[i].x-p[j].x)+LL(p[i].y-p[j].y)*(p[i].y-p[j].y));
	sort(ve+1,ve+cn+1,cmp);
	int left=1, right=cn;
	while (left!=right)
	{
		int mid=(left+right+1)/2;
		if (check(mid)) left=mid; else right=mid-1;
	}
	check(left);
	rep(i,1,n)
		if (c[i] || used<m)
		{
			printf("%d ",i);
			if (!c[i]) used++;
		}
	printf("\n");
}

int main()
{
	ios::sync_with_stdio(true);
	#ifndef ONLINE_JUDGE
		freopen("164D.in","r",stdin);
	#endif
	lemon();
	return 0;
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]--, du[x]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]++, du[x]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        du[j]--, du[x]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        du[j]++, du[x]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    //if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    //}
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (j > x) du[j]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        du[j]--, du[x]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        du[j]++, du[x]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    if (n == 100) printf("%d\n", dist(b[r].X, b[r].Y));
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];
int q2[1111][1111], qt2[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
     if (ch[x] == 1) cout << "CAONIBA" << endl;
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        if (ch[j] != 1){
           du[j]--, du[x]--;
           q2[x][++qt2[x]] = j;
        }
    }
}

bool chose_n(int x){
    if (ch[x] == 0) return 1;
    tot++;
    ch[x] = 0;
    for (; qt2[x]; qt2[x]--){
        du[q2[x][qt2[x]]]++;
        du[x]++;
    }
    return 0;
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && ch[g[k]] != 1) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && ch[j] != 1) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, 0, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    memset(qtop, 0, sizeof qtop);
    memset(qt2, 0, sizeof qt2);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    //system("pause");
}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<cstdlib>
#include<algorithm>
#include<vector>
using namespace std;
#define X first
#define Y second
typedef pair<int, int> PII;
int n, m, N, nT, tot;
int g[1111 * 2222], nxt[1111 * 2222], nm, c[1111];
int ch[1111], ans[1111], idx[1111], du[1111], ansn;
PII p[1111], b[1111 * 1111];
int q[1111][1111], qtop[1111];

inline int sqr(int x){
    return x * x;
}

inline int dist(int x, int y){
    return sqr(p[x].X - p[y].X) + sqr(p[x].Y - p[y].Y);
}

int cmp(PII x, PII y){
    return dist(x.X, x.Y) < dist(y.X, y.Y);
}

int equ(PII x, PII y){
    return dist(x.X, x.Y) == dist(y.X, y.Y);
}

void addedge(int x, int y){
    g[nm] = y; nxt[nm] = c[x]; c[x] = nm; nm++;
}

void chose_y(int x){
    tot--;
    ch[x] = 1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        du[j]--, du[x]--;
    }
}

void chose_n(int x){
    tot++;
    ch[x] = -1;
    for (int k = c[x]; ~k; k = nxt[k]){
        int j = g[k];
        du[j]++, du[x]++;
    }
}

bool dfs(int x){
    if (tot < 0) return 0;
    if (x > nT){
        ansn = 0;
        for (int i = 1; i <= n; ++i)
            if (ch[idx[i]] == 1) ans[++ansn] = i;
        return 1;
    }
    if (ch[x] == 1){
        if (dfs(x + 1)) return 1;
        return 0;
    }
    // chose no
    ch[x] = 0;
    int fk = 0;
    for (int k = c[x]; ~k; k = nxt[k])
        if (g[k] < x && !ch[g[k]]) {fk = 1; break;}
    if (fk == 0){
       for (int k = c[x]; ~k; k = nxt[k]){
           int j = g[k];
           if (j > x && !ch[j]) {chose_y(j);q[x][++qtop[x]] = j;}
       }
       if (dfs(x + 1)) return 1;
       for (; qtop[x] > 0; qtop[x]--) chose_n(q[x][qtop[x]]);
    }
    // chose yes
    if (du[x] > 1){
        chose_y(x);
        if (dfs(x + 1)) return 1;
        chose_n(x);
    }
    return 0;
}

bool cks(int w){
    memset(ch, -1, sizeof ch);
    int d = dist(b[w].X, b[w].Y);
    tot = m;
    memset(idx, 0, sizeof idx); nT = 0;
    memset(c, -1, sizeof c), nm = 0;
    memset(du, 0, sizeof du);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            if (dist(i, j) > d){
                int x, y;
                if (!idx[i]) idx[i] = ++nT;
                if (!idx[j]) idx[j] = ++nT;
                x = idx[i], y = idx[j];
                addedge(x, y);
                addedge(y, x);
                du[x]++; du[y]++;
            }
    return dfs(1);
}

int main(){
    scanf("%d%d", &n, &m);
    if (m == n - 1){
        for (int i = 1; i <= m; ++i)
            printf(i < m ? "%d " : "%d\n", i);
        return 0;
    }
    for (int i = 1; i <= n; ++i)
        scanf("%d%d", &p[i].X, &p[i].Y);
    for (int i = 1; i <= n; ++i)
        for (int j = i + 1; j <= n; ++j)
            b[++N] = make_pair(i, j);
    b[++N] = make_pair(0, 0);
    sort(b + 1, b + 1 + N, cmp);
    N = unique(b + 1, b + 1 + N, equ) - b - 1;
    int l = 0, r = N + 1;
    while (l + 1 < r){
        int mid = (l + r) >> 1;
        if (cks(mid))
            r = mid; else l = mid;
    }
    cks(r);
    memset(du, 0, sizeof du);
    for (int i = 1; i <= ansn; ++i)
        du[ans[i]] = 1;
    for (int i = 1; i <= n; ++i)
        if (!du[i] && ansn < m) ans[++ansn] = i;
    for (int i = 1; i <= ansn; ++i)
        printf(i < ansn ? "%d " : "%d\n", ans[i]);
    if (n == 100){
       printf("%d\n", dist(b[r].X, b[r].Y));
       for (int j = 74; j <= n; ++j)
           printf("%d %d\n", p[j].X, p[j].Y);
    }
    //system("pause");
}