#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
  double dist() { return sqrt(x * x + y * y); }
  double angle() { return atan2(y, x); }
};
int n, m;
point p[100000];
pair<double, int> l[200000];
pair<int, int> il[100000];
bool removed[100000];
int cnt[100000][20];
bool test2(vector<pair<int, int>> &v) {
  vector<pair<int, int>> e;
  set<int> cur;
  for (int i = 0; i < v.size(); ++i) {
    e.push_back({v[i].first, i - n});
    e.push_back({v[i].second, i});
    if (v[i].first > v[i].second) cur.insert(i);
  }
  sort(e.begin(), e.end());
  for (int i = 0; i < e.size(); ++i) {
    if (e[i].second < 0) {
      cur.insert(e[i].second + n);
    } else {
      cnt[e[i].second][0] = cur.size();
      cur.erase(e[i].second);
    }
  }
  for (int j = 1; j < 20; ++j) {
    for (int i = 0; i < v.size(); ++i) {
      cnt[i][j] = cnt[i][j - 1] + cnt[(i + cnt[i][j - 1]) % v.size()][j - 1];
    }
  }
  int s = -1;
  for (int i = 0; i < v.size(); ++i)
    if (v[i].first < v[i].second) {
      s = i;
      break;
    }
  if (s == -1) return true;
  deque<int> l;
  int cr = 0;
  for (int i = 0; i < v.size(); ++i) {
    if ((v[i].first < v[s].first || v[i].first > v[s].second) &&
        (v[i].second >= v[s].first && v[i].second <= v[s].second))
      l.push_back(v[i].second);
  }
  sort(l.begin(), l.end());
  for (int i = v[s].first; i <= v[s].second; ++i) {
    while (l.size() > 0 && l[0] < i) l.pop_front();
    while ((s + cr + 1) % v.size() != s &&
           v[(s + cr + 1) % v.size()].first <= i)
      cr++;
    int c = 1 + cr;
    int mm = m - 1;
    for (int j = 0; j < 20; ++j) {
      if (mm % 2 == 1) c += cnt[(s + c) % v.size()][j];
      mm /= 2;
    }
    if (c + l.size() >= v.size()) return true;
  }
  return false;
}
bool test(double r) {
  for (int i = 0; i < n; ++i) {
    double angle1 = p[i].angle();
    double angle2 = acos(r / p[i].dist());
    l[2 * i] = {fmod(angle1 - angle2 + 2 * 3.14159265358979323846,
                     2 * 3.14159265358979323846),
                i - n};
    l[2 * i + 1] = {fmod(angle1 + angle2 + 2 * 3.14159265358979323846,
                         2 * 3.14159265358979323846),
                    i};
    removed[i] = false;
  }
  sort(l, l + 2 * n);
  for (int i = 0; i < 2 * n; ++i) {
    if (l[i].second < 0)
      il[l[i].second + n].first = i;
    else
      il[l[i].second].second = i;
  }
  sort(il, il + n);
  vector<pair<int, int>> e;
  set<pair<int, int>> cur;
  for (int i = 0; i < n; ++i) {
    e.push_back({il[i].first, i - n});
    e.push_back({il[i].second, i});
    if (il[i].first > il[i].second) cur.insert({il[i].first - 2 * n, i});
  }
  sort(e.begin(), e.end());
  for (int i = 0; i < e.size(); ++i) {
    if (e[i].second < 0) {
      cur.insert({e[i].first, e[i].second + n});
    } else {
      int p = e[i].second;
      int s = il[p].first > il[p].second ? il[p].first - 2 * n : il[p].first;
      cur.erase({s, p});
      while (cur.size() > 0 && cur.begin()->first < s) {
        removed[cur.begin()->second] = true;
        cur.erase(cur.begin());
      }
    }
  }
  vector<pair<int, int>> cil;
  for (int i = 0; i < n; ++i)
    if (!removed[i]) cil.push_back(il[i]);
  return test2(cil);
}
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> p[i].x >> p[i].y;
  double u = 0, o = 1e9;
  for (int i = 0; i < n; ++i) o = min(o, p[i].dist());
  while (o - u > 1e-8) {
    double m = (u + o) / 2;
    if (test(m))
      u = m;
    else
      o = m;
  }
  cout << setprecision(20) << u << "\n";
}
