#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const double EPS = 1e-8;
const double PI = acos(-1.0);
const int MAXN = 100010;
const int LOGN = 20;
struct Point {
  int x, y;
  double theta, dist;
};
int f[MAXN + MAXN][LOGN];
bool Check(double mid, vector<Point>& x, int m) {
  int n = x.size();
  vector<pair<double, double>> y;
  for (int i = 0; i < n; ++i) {
    double alpha = acos(mid / x[i].dist);
    if (x[i].theta - alpha < -PI) {
      y.push_back({x[i].theta - alpha + 2 * PI, x[i].theta + alpha + 2 * PI});
      y.push_back({x[i].theta - alpha + 4 * PI, x[i].theta + alpha + 4 * PI});
    } else {
      y.push_back({x[i].theta - alpha, x[i].theta + alpha});
      y.push_back({x[i].theta - alpha + 2 * PI, x[i].theta + alpha + 2 * PI});
    }
  }
  sort(y.begin(), y.end());
  memset(f, 0, sizeof(f));
  int j = 0;
  multiset<double> e;
  for (int i = 0; i < n + n; ++i) {
    if (e.empty()) {
      e.insert(y[j].second);
      ++j;
    }
    while (j < n + n && *e.begin() >= y[j].first) {
      e.insert(y[j].second);
      ++j;
    }
    f[i][0] = j;
    e.erase(e.find(y[i].second));
  }
  for (int i = 1; i < LOGN; ++i) {
    for (int j = 0; j < n + n; ++j) {
      if (f[j][i - 1] == n + n) {
        f[j][i] = n + n;
      } else {
        f[j][i] = f[f[j][i - 1]][i - 1];
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    int cnt = 0;
    int p = i;
    for (int j = LOGN - 1; j >= 0; --j) {
      if (f[p][j] >= i + n) continue;
      cnt += (1 << j);
      p = f[p][j];
    }
    if (m >= cnt + 1) return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  vector<Point> x(n);
  double L = 0, R = 1e10;
  for (int i = 0; i < n; ++i) {
    cin >> x[i].x >> x[i].y;
    x[i].theta = atan2(x[i].y, x[i].x);
    x[i].dist = sqrt(1LL * x[i].x * x[i].x + 1LL * x[i].y * x[i].y);
    R = min(R, x[i].dist);
  }
  if (m >= n) {
    cout << fixed << setprecision(10) << R << endl;
    return 0;
  }
  while (L + EPS < R && L * (1 + EPS) < R) {
    double mid = (L + R) / 2;
    if (Check(mid, x, m))
      L = mid;
    else
      R = mid;
  }
  cout << fixed << setprecision(10) << L << endl;
  return 0;
}
