#include <bits/stdc++.h>
using namespace std;
const int LOG = 17;
const double EPS = 1e-11;
const double PI = acos(-1);
const double L = 2 * PI;
bool eq(double x, double y) { return fabs(x - y) < EPS; }
struct Event {
  double x;
  int id, type;
  Event(double _x, int _id, int _type) : x(_x), id(_id), type(_type){};
  Event(){};
  bool operator<(const Event& e) const {
    if (!eq(x, e.x)) return x < e.x;
    return type > e.type;
  }
  void show() { printf("%.15f %d %d\n", x, id, type); }
};
double sqr(double x) { return x * x; }
void calc(int x, int y, double R, double& l, double& r) {
  double alpha = atan2(y, x);
  if (y < 0) alpha += L;
  double beta = atan2(sqrt(sqr(x) + sqr(y) - sqr(R)), R);
  l = alpha - beta;
  r = alpha + beta;
  if (l < 0) l += L;
  if (r >= L) r -= L;
}
double dist(double x, double y) {
  double d = y - x;
  if (d < 0) d += L;
  return d;
}
const int N = (int)2e5 + 5;
int x[N], y[N];
double l[N], r[N];
int nxt[N][LOG];
double len[N][LOG];
Event events[N], eright[N];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  vector<int> x(n), y(n);
  for (int i = 0; i < n; ++i) {
    scanf("%d %d", &x[i], &y[i]);
    if (x[i] == 0 && y[i] == 0) {
      printf("0\n");
      return 0;
    }
  }
  function<bool(double, double, double)> in = [&](double x, double l,
                                                  double r) {
    if (l <= r) return (l <= x) && (x <= r);
    return (l <= x) || (x <= r);
  };
  int events_size;
  function<bool(double)> check = [&](double R) {
    events_size = 0;
    for (int i = 0; i < n; ++i) {
      if (sqr(x[i]) + sqr(y[i]) < sqr(R) + EPS) return false;
      calc(x[i], y[i], R, l[i], r[i]);
      events[events_size++] = Event(l[i], i, 1);
      eright[i] = Event(r[i], i, -1);
      events[events_size++] = eright[i];
    }
    sort(events, events + events_size);
    for (int i = 0, pos = 0; i < events_size; ++i) {
      Event& e = events[i];
      if (e.type == 1) {
        if (pos == i) ++pos;
      } else {
        double ax = e.x + 3 * EPS;
        if (ax >= L) ax -= L;
        int step;
        for (step = 0; step < events_size;
             ++step, pos = (pos + 1) % events_size) {
          if (events[pos].type == -1 &&
              !in(e.x, l[events[pos].id], r[events[pos].id]))
            break;
        }
        if (step == events_size) return true;
        nxt[e.id][0] = events[pos].id;
        len[e.id][0] = dist(e.x, events[pos].x);
      }
    }
    for (int k = 0; k < LOG - 1; ++k) {
      for (int i = 0; i < n; ++i) {
        nxt[i][k + 1] = nxt[nxt[i][k]][k];
        len[i][k + 1] = len[i][k] + len[nxt[i][k]][k];
      }
    }
    for (int i = 0; i < n; ++i) {
      double jump_len = 0;
      int pos = i, jump = 0;
      for (int k = LOG - 1; k >= 0; --k) {
        if (jump + (1 << k) <= m) {
          jump_len += len[pos][k];
          pos = nxt[pos][k];
          jump += 1 << k;
        }
      }
      if (jump_len >= 2 * PI) return true;
    }
    return false;
  };
  int ITER;
  if (n < 100000)
    ITER = 60;
  else
    ITER = 40;
  double low = 0, hi = 2e5, mid;
  for (int it = 0; it < ITER; ++it) {
    mid = (low + hi) / 2;
    if (check(mid))
      low = mid;
    else
      hi = mid;
  }
  printf("%.15f\n", low);
}
