#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000 + 10;
const double eps = 1e-10;
const double pi = acos(-1);
int n, m;
struct point {
  double x, y;
  point() {}
  point(double _x, double _y) : x(_x), y(_y) {}
} a[maxn], p[maxn << 1];
inline double getval(double x, double y) { return sqrt(x * x + y * y); }
inline bool cmp(point a, point b) {
  if (fabs(a.y - b.y) < eps) return a.x < b.x;
  return a.y < b.y;
}
int nxt[20][maxn << 1];
inline bool check(double k) {
  for (int i = 1; i <= n; i++) {
    double A = atan2(a[i].y, a[i].x);
    double B = acos(k / getval(a[i].x, a[i].y));
    if (A + B > pi) A -= pi * 2.0;
    p[i] = point(A - B, A + B);
    p[i + n] = point(A - B + pi * 2.0, A + B + pi * 2.0);
  }
  sort(p + 1, p + n + n + 1, cmp);
  for (int i = 1, j = 1; i <= 2 * n; i++) {
    while (j < 2 * n && p[j].x <= p[i].y) j++;
    nxt[0][i] = j;
  }
  for (int j = 1; j <= 19; j++) {
    for (int i = 1; i <= 2 * n; i++) nxt[j][i] = nxt[j - 1][nxt[j - 1][i]];
  }
  for (int i = 1; i <= n; i++) {
    int now = 0, x = i;
    for (int j = 19; j >= 0; j--) {
      if (nxt[j][x] <= i + n - 1) {
        x = nxt[j][x];
        now |= (1 << j);
      }
    }
    if (now + 1 <= m) return 1;
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  double l = 0, r = 1e15;
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &a[i].x, &a[i].y);
    r = min(r, getval(a[i].x, a[i].y));
  }
  while (r - l > eps) {
    double mid = (l + r) / 2.0;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10lf\n", l);
  return 0;
}
