#include <bits/stdc++.h>
using namespace std;
inline void smin(double &a, const double &b) {
  if (b < a) a = b;
}
struct point {
  double first, second;
  inline point() { first = second = 0; }
  inline point(int first, int second) : first(first), second(second) {}
  inline void input() { scanf("%lf %lf", &first, &second); }
  inline double al() { return atan2(second, first); }
  inline double nor() { return sqrt(first * first + second * second); }
};
int n, m, N;
point p[101010];
pair<double, double> pd[202020];
pair<int, int> pp[202020];
const double pi = acos(-1);
double vec[202020];
int nxt[202020][18];
inline pair<double, double> seg(point a, double R) {
  double alpha = a.al();
  if (alpha < -1e-7) alpha += 2 * pi;
  double delta = acos(R / a.nor());
  double mn = alpha - delta;
  if (mn < -1e-7) mn += 2 * pi;
  double mx = alpha + delta;
  if (mx > 2 * pi - 1e-7) mx -= pi * 2;
  vec[N++] = mn, vec[N++] = mx;
  return pair<double, double>(mn, mx);
}
inline bool in(pair<int, int> a, pair<int, int> b) {
  while (b.first < a.first) b.first += N, b.second += N;
  return b.second <= a.second;
}
inline bool can(double R) {
  if (R < 1e-7) return true;
  N = 0;
  for (int i = 1; i <= n; i++) pd[i] = seg(p[i], R);
  sort(vec, vec + N), N = unique(vec, vec + N) - vec;
  for (int i = 1; i <= n; i++) {
    pp[i].first = lower_bound(vec, vec + N, pd[i].first) - vec;
    pp[i].second = lower_bound(vec, vec + N, pd[i].second) - vec;
  }
  sort(pp + 1, pp + n + 1);
  for (int i = 1; i <= n; i++)
    if (pp[i].first > pp[i].second) {
      pp[i].second += N;
    }
  int st = 1, ed = 2;
  for (int i = 2; i <= n; i++) {
    if (in(pp[i], pp[ed - 1])) continue;
    if (in(pp[i], pp[st])) continue;
    while (st < ed && in(pp[st], pp[i])) st++;
    while (st < ed && in(pp[ed - 1], pp[i])) ed--;
    pp[ed++] = pp[i];
  }
  int nn = 0;
  for (int i = st; i < ed; i++) pp[nn++] = pp[i];
  if (N <= m) return true;
  for (int i = 0; i < nn; i++)
    pp[nn + i] = pair<int, int>(pp[i].first + N, pp[i].second + N);
  N = nn;
  for (int i = 0, id = 0; i < N; i++) {
    if (id < i) id = i;
    for (; id < i + N && pp[id].first <= pp[i].second; id++)
      ;
    if (id == i + N) return true;
    nxt[i][0] = id - i;
  }
  for (int j = 1; j < 18; j++) {
    for (int i = 0; i < N; i++) {
      nxt[i][j] = min(N, nxt[i][j - 1] + nxt[(i + nxt[i][j - 1]) % N][j - 1]);
    }
  }
  for (int i = 0; i < N; i++) {
    for (int j = 18, k = i, tot = 0; j--;)
      if (m & (1 << j)) {
        tot += nxt[k][j];
        if (tot >= N) return true;
        k += nxt[k][j];
        if (k >= N) k -= N;
      }
    continue;
    int id = i, j;
    for (int k = m, num = 0; k; k ^= k & -k) {
      j = __builtin_ctz(k);
      num += nxt[id][j];
      if (num >= N) return true;
      id += nxt[id][j];
      if (id >= N) id -= N;
    }
  }
  return false;
}
int main() {
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) p[i].input();
  double st = 0, ed = p[1].nor();
  for (int i = 2; i <= n; i++) smin(ed, p[i].nor());
  while ((ed - st) / max(1., ed) > 1e-6) {
    double md = (st + ed) / 2;
    if (can(md))
      st = md;
    else
      ed = md;
  }
  printf("%.8lf\n", st);
}
