#include <bits/stdc++.h>
const int N = 1005, M = 2 * N * N;
int n, k, l, 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] =
          ((x[i] - x[j]) * (x[i] - x[j])) + ((y[i] - y[j]) * (y[i] - y[j]));
  while (l < r) mid = (l + r) / 2, check(mid) ? r = mid : l = mid + 1;
  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;
}
