#include <bits/stdc++.h>
using namespace std;
const double PI = atan2(1, 0) * 2;
const int MAXN = 1.1e5;
int N;
int M;
pair<double, double> pts[MAXN];
int nxt[MAXN];
pair<double, double> ranges[MAXN * 3];
int numBarriers(double dist) {
  for (int i = 0; i < N; i++) {
    double angRange = acos(dist / pts[i].first);
    double a = pts[i].second - angRange;
    double b = pts[i].second + angRange;
    if (a < 0) a += 2 * PI, b += 2 * PI;
    ranges[i] = {a, b};
  }
  sort(ranges, ranges + N);
  for (int i = 0; i < N * 2 + 10; i++) {
    ranges[i + N].first = ranges[i].first + 2 * PI;
    ranges[i + N].second = ranges[i].second + 2 * PI;
  }
  deque<pair<double, int>> right_pts;
  for (int i = 0, j = -1; i < N; i++) {
    while (right_pts.empty() || ranges[j].first <= right_pts.front().first) {
      j++;
      double v = ranges[j].second;
      while (!right_pts.empty() && right_pts.back().first >= v) {
        right_pts.pop_back();
      }
      right_pts.emplace_back(v, j);
    }
    assert(j <= i + N && j > i);
    nxt[i] = j;
    if (!right_pts.empty() && right_pts.front().second == i)
      right_pts.pop_front();
  }
  int a = 0, b = 0;
  do {
    a = nxt[a] % N;
    b = nxt[b] % N;
    b = nxt[b] % N;
  } while (a != b);
  int cnt = 0;
  while (b < a + N) {
    b += (nxt[b % N] - b % N);
    cnt++;
  }
  return cnt;
}
bool isGood(double dist) { return numBarriers(dist) <= M; }
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> N >> M;
  for (int i = 0; i < N; i++) {
    long long x, y;
    cin >> x >> y;
    if (x == 0 && y == 0) {
      cout << fixed << setprecision(10) << 0. << '\n';
      exit(0);
    }
    pts[i].first = double(sqrt(x * x + y * y));
    pts[i].second = atan2(y, x);
    if (pts[i].second < 0) pts[i].second += 2 * PI;
  }
  double ma = pts[0].first;
  for (int i = 0; i < N; i++) ma = min(ma, pts[i].first);
  double mi = 0;
  if (ma > 1 && isGood(1)) {
    mi = 1;
    for (int z = 0; z < 30; z++) {
      double md = mi * sqrt(ma / mi);
      if (isGood(md)) {
        mi = md;
      } else {
        ma = md;
      }
    }
  } else {
    ma = min(ma, 1.);
    for (int z = 0; z < 30; z++) {
      double md = mi + (ma - mi) / 2;
      if (isGood(md)) {
        mi = md;
      } else {
        ma = md;
      }
    }
  }
  cout << fixed << setprecision(10) << mi << '\n';
  return 0;
}
