#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 100000;
const int MAXLG = 16;
const double MPI = acos(-1.0);
struct P {
  int x, y;
};
double len(const P &a) { return sqrt(1.0 * a.x * a.x + 1.0 * a.y * a.y); }
struct R {
  double l, r;
  R() {}
  R(double l, double r) : l(l), r(r) {}
};
bool operator<(const R &a, const R &b) { return a.r < b.r; }
int n, lim;
P p[MAXN];
R ranges[2 * MAXN];
int cnt[MAXN][MAXLG + 1];
bool can(double r) {
  for (int i = (0); i < (n); ++i) {
    double d = len(p[i]);
    if (d < r) return false;
    if (d == 0) return r == 0;
    double alpha = atan2(p[i].y, p[i].x), beta = acos(r / d);
    ranges[i] = R(alpha - beta, alpha + beta);
  }
  for (int i = (0); i < (n); ++i) {
    while (ranges[i].r < 0) ranges[i].l += 2 * MPI, ranges[i].r += 2 * MPI;
    while (ranges[i].r >= 2 * MPI)
      ranges[i].l -= 2 * MPI, ranges[i].r -= 2 * MPI;
  }
  sort(ranges, ranges + n);
  for (int i = (0); i < (n); ++i)
    ranges[n + i] = R(ranges[i].l + 2 * MPI, ranges[i].r + 2 * MPI);
  int at = 0;
  for (int i = (0); i < (n); ++i) {
    while (at < 2 * n && ranges[i].r >= ranges[at].l) ++at;
    assert(at < 2 * n);
    cnt[i][0] = at - i;
  }
  for (int k = (0); k < (MAXLG); ++k)
    for (int i = (0); i < (n); ++i)
      cnt[i][k + 1] = min(n, cnt[i][k] + cnt[(i + cnt[i][k]) % n][k]);
  for (int i = (0); i < (n); ++i) {
    int cur = 0;
    for (int k = (0); k <= (MAXLG); ++k)
      if (lim & (1 << k)) cur = min(n, cur + cnt[(i + cur) % n][k]);
    if (cur >= n) return true;
  }
  return false;
}
double solve() {
  double closest = 1e200;
  for (int i = (0); i < (n); ++i) {
    double dist = len(p[i]);
    closest = min(closest, dist);
  }
  double lo = 0, hi = closest;
  for (int rep = (0); rep < (100); ++rep) {
    if (fabs(hi - lo) < 1e-12) break;
    double mi = lo + (hi - lo) / 2;
    if (can(mi))
      lo = mi;
    else
      hi = mi;
  }
  return lo;
}
void run() {
  scanf("%d%d", &n, &lim);
  for (int i = (0); i < (n); ++i) scanf("%d%d", &p[i].x, &p[i].y);
  printf("%.15lf\n", solve());
}
int main() {
  run();
  return 0;
}
