#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int NMAX = 100010;
namespace Geometry {
vector<pair<double, double>> points;
pair<vector<pair<double, double>>, bool> get_intervals(double r) {
  vector<pair<double, double>> ans;
  for (auto i : points) {
    double d = sqrt(i.first * i.first + i.second * i.second);
    if (d <= r) return {vector<pair<double, double>>(), 0};
    double angle = atan2(i.second, i.first);
    double dif = acos(r / d);
    ans.push_back({angle - dif, angle + dif});
  }
  return {ans, 1};
}
}  // namespace Geometry
namespace IntervalSolver {
vector<pair<double, double>> intervals;
vector<pair<double, int>> capete;
int jump[20][2 * NMAX];
int nr;
bool MinimPoints(vector<pair<double, double>>& _v, int m) {
  intervals = _v;
  sort(intervals.begin(), intervals.end(),
       [](pair<double, double> a, pair<double, double> b) {
         if (a.second == b.second) return a.first < b.first;
         return a.second < b.second;
       });
  for (int i = 0; i < _v.size(); i++)
    intervals.push_back(
        {intervals[i].first + 2 * pi, intervals[i].second + 2 * pi});
  capete.clear();
  for (int i = 0; i < intervals.size(); i++)
    capete.push_back({intervals[i].first, i});
  sort(capete.rbegin(), capete.rend());
  nr = intervals.size();
  int worst = nr;
  for (int i = 0; i < 20; i++) jump[i][worst] = worst;
  for (int i = nr - 1, it = 0; i >= 0; i--) {
    while (it != capete.size() && intervals[i].second < capete[it].first) {
      if (worst == nr ||
          intervals[worst].second > intervals[capete[it].second].second)
        worst = capete[it].second;
      it++;
    }
    jump[0][i] = worst;
    for (int j = 1; j < 20; j++) jump[j][i] = jump[j - 1][jump[j - 1][i]];
  }
  for (int inc = 0; inc < _v.size(); inc++) {
    int need = inc + _v.size(), act = inc;
    for (int i = 0; i < 20; i++)
      if (m & (1 << i)) act = jump[i][act];
    if (act >= need) return 1;
  }
  return 0;
}
}  // namespace IntervalSolver
int main() {
  int n, m, a, b;
  scanf("%d%d", &n, &m);
  while (n--) {
    scanf("%d%d", &a, &b);
    Geometry::points.push_back({a, b});
  }
  sort(Geometry::points.begin(), Geometry::points.end());
  Geometry::points.resize(
      unique(Geometry::points.begin(), Geometry::points.end()) -
      Geometry::points.begin());
  double p = 0, q = 1e5;
  for (int i = 0; i < 60; i++) {
    bool ok;
    vector<pair<double, double>> v;
    tie(v, ok) = Geometry::get_intervals(p + q);
    if (ok && IntervalSolver::MinimPoints(v, m)) p += q;
    q /= 2;
  }
  cout << setprecision(9) << fixed;
  cout << p << '\n';
  return 0;
}
