#include <bits/stdc++.h>
using namespace std;
using LL = long long;
using PII = pair<int, int>;
const int N = 1005;
int n, k, dis[N][N], vis[N];
PII ps[N];
vector<int> g[N];
inline int dist(PII p, PII q) {
  return (p.first - q.first) * (p.first - q.first) +
         (p.second - q.second) * (p.second - q.second);
}
bool dfs(int u, int k) {
  if (u > n) return true;
  if (vis[u]) return dfs(u + 1, k);
  for (auto v : g[u]) k -= !vis[v]++;
  if (k >= 0 && dfs(u + 1, k)) return true;
  int tmp = k;
  vis[u] = 1;
  for (auto v : g[u]) k += !--vis[v];
  if ((--k) >= 0 && k > tmp && dfs(u + 1, k)) return true;
  vis[u] = 0;
  return false;
}
bool check(int mid) {
  for (int i = (1); i <= (n); i++) vis[i] = 0, g[i].clear();
  for (int i = (1); i <= (n); i++)
    for (int j = (1); j <= (n); j++)
      if (dis[i][j] > mid) g[i].push_back(j);
  return dfs(1, k);
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = (1); i <= (n); i++) scanf("%d%d", &ps[i].first, &ps[i].second);
  for (int i = (1); i <= (n); i++)
    for (int j = (i + 1); j <= (n); j++)
      dis[i][j] = dis[j][i] = dist(ps[i], ps[j]);
  int lb = -1, ub = INT_MAX;
  while (lb + 1 < ub) {
    int mid = (LL)lb + ub >> 1;
    if (check(mid))
      ub = mid;
    else
      lb = mid;
  }
  check(ub);
  for (int i = (1); i <= (n); i++)
    if (vis[i]) printf("%d ", i), k--;
  for (int i = (1); i <= (n); i++)
    if (!vis[i] && k) printf("%d ", i), k--;
  puts("");
}
