#include <bits/stdc++.h>
using namespace std;
const int N = 4e5 + 5;
const double eps = 1e-9;
const double pi = acos(-1);
pair<double, double> P[N];
double x[N], y[N];
int rch[N][20];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(9);
  int n;
  cin >> n;
  int m;
  cin >> m;
  for (int i = 1; i <= n; ++i) cin >> x[i] >> y[i];
  auto check = [&](double radius) {
    int tot = 0;
    int ptr = 1;
    for (int i = 1; i <= n; ++i) {
      double s = atan2(y[i], x[i]);
      double d = hypot(y[i], x[i]);
      if (radius > d) return 0;
      double p = acos(radius / d);
      P[++tot] = pair<double, double>(s - p, s + p);
      s += 4.0 * pi;
      P[++tot] = pair<double, double>(s - p, s + p);
    }
    sort(P + 1, P + 1 + tot);
    for (int i = 1; i <= tot; ++i)
      if (P[i].first >= 2.0 * pi)
        P[i].first -= 2.0 * pi, P[i].second -= 2.0 * pi;
    double rig = 4.0 * pi;
    vector<int> v(tot + 1, 1);
    for (int i = tot; i; --i) {
      if (rig > P[i].second)
        rig = P[i].second;
      else
        v[i] = 0;
    }
    tot = 0;
    for (int i = 1; i <= n; ++i)
      if (v[i]) P[++tot] = P[i];
    for (int i = 1; i <= tot; ++i)
      P[i + tot] = P[i], P[i + tot].first += 2.0 * pi,
            P[i + tot].second += 2.0 * pi;
    tot <<= 1;
    for (int i = 1; i <= tot; ++i) {
      while (ptr <= tot && P[ptr].first <= P[i].second) ++ptr;
      rch[i][0] = ptr;
    }
    for (int i = 0; (2 << i) <= tot; ++i)
      for (int j = 1; (2 << i) <= tot - j + 1; ++j)
        rch[j][i + 1] = rch[rch[j][i]][i];
    tot >>= 1;
    for (int i = 1; i <= tot; ++i) {
      int x = i, e = 0;
      for (int T = m; T; T >>= 1, ++e)
        if (T & 1) x = rch[x][e];
      if (x < 1 || x >= i + tot) return 1;
    }
    return 0;
  };
  double L = 0;
  double R = 2e5;
  while (L + eps < R) {
    double M = (L + R) / 2;
    if (check(M))
      L = M;
    else
      R = M;
  }
  cout << L << endl;
}
