#include <bits/stdc++.h>
const int maxn = 2e5 + 9, mod = 998244353, inf = 0x3f3f3f3f;
const double pi = acos(-1.0);
int Read() {
  int x(0), f(1);
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 3ll) + (x << 1ll) + c - '0';
    c = getchar();
  }
  return x * f;
}
void Chkmin(int &x, int y) {
  if (y < x) x = y;
}
void Chkmax(int &x, int y) {
  if (y > x) x = y;
}
int add(int x, int y) { return x += y, x >= mod ? x - mod : x; }
int dec(int x, int y) { return x -= y, x < 0 ? x + mod : x; }
int mul(int x, int y) { return 1ll * x * y % mod; }
int Pow(int base, int b) {
  int ret(1);
  while (b) {
    if (b & 1) ret = mul(ret, base);
    base = mul(base, base);
    b >>= 1;
  }
  return ret;
}
struct point {
  double x, y;
};
struct Range {
  double l, r;
  bool operator<(const Range A) const { return r < A.r; }
};
int n, m;
point a[maxn];
int f[maxn][19];
double Dist(double x, double y) { return std::sqrt(x * x + y * y); }
bool Check(double r) {
  static Range rang[maxn];
  for (int i = 1; i <= n; ++i) {
    double angle(atan2(a[i].y, a[i].x));
    double fd(acos(r / Dist(a[i].x, a[i].y)));
    double lt(angle - fd), rt(angle + fd);
    if (rt > pi) lt -= 2.0 * pi, rt -= 2.0 * pi;
    rang[i] = (Range){lt, rt};
  }
  std::sort(rang + 1, rang + 1 + n);
  for (int i = 1; i <= n; ++i) {
    rang[i + n] = rang[i];
    rang[i + n].l += 2.0 * pi;
    rang[i + n].r += 2.0 * pi;
  }
  for (int i = 1, j = 1; i <= 2 * n; ++i) {
    while (j < 2 * n && rang[j].l <= rang[i].r) ++j;
    f[i][0] = j;
  }
  for (int j = 1; j <= 18; ++j) {
    for (int i = 1; i <= 2 * n; ++i) {
      f[i][j] = f[f[i][j - 1]][j - 1];
    }
  }
  for (int i = 1; i <= n; ++i) {
    int pos(i), num(1);
    for (int j = 18; j >= 0; --j)
      if (f[pos][j] < i + n) {
        num += (1 << j);
        pos = f[pos][j];
      }
    if (num <= m) return 1;
  }
  return 0;
}
int main() {
  n = Read();
  m = Read();
  double l(0), r(inf);
  for (int i = 1; i <= n; ++i) {
    double x(Read()), y(Read());
    a[i] = (point){x, y};
    r = std::min(r, Dist(x, y));
  }
  int T(40);
  while (T--) {
    double mid((l + r) / 2.0);
    if (Check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10lf\n", l);
  return 0;
}
