#include <bits/stdc++.h>
const int N = 200005;
const double eps = 1e-7, pi = std::acos(-1);
int n, m, x[N], y[N];
double dis[N];
std::pair<double, double> interval[N];
int f[18][N];
long long sqr(int x) { return (long long)x * x; }
bool check(double d) {
  for (int i = 0; i < n; ++i) {
    double pos = std::atan2(y[i], x[i]), len = std::acos(d / dis[i]);
    if (pos - len < 0) pos += 2 * pi;
    interval[i] = {pos - len, pos + len};
    interval[i + n] = {pos - len + pi * 2, pos + len + 2 * pi};
  }
  std::sort(interval, interval + n + n);
  static int stack[N];
  int top = 0;
  for (int i = 0; i < n + n; ++i) {
    while (top && interval[stack[top - 1]].second >= interval[i].second) --top;
    stack[top++] = i;
  }
  for (int i = 0; i < top; ++i) {
    auto cmp = [&](double x, int y) { return interval[y].first > x; };
    int r =
        std::upper_bound(stack, stack + top, interval[stack[i]].second, cmp) -
        stack;
    f[0][i] = r;
  }
  f[0][top] = top, stack[top] = n + n;
  for (int i = 1; 1 << i <= m; ++i)
    for (int j = 0; j <= top; ++j) f[i][j] = f[i - 1][f[i - 1][j]];
  for (int i = 0; i < top; ++i)
    if (stack[i] < n) {
      int pos = i;
      for (int j = m; j; j &= j - 1) pos = f[__builtin_ctz(j)][pos];
      if (stack[pos] - stack[i] >= n) return 1;
    }
  return 0;
}
int main() {
  std::ios::sync_with_stdio(0), std::cin.tie(0);
  std::cin >> n >> m;
  for (int i = 0; i < n; ++i)
    std::cin >> x[i] >> y[i], dis[i] = std::sqrt(sqr(x[i]) + sqr(y[i]));
  double l = 0, r = *std::min_element(dis, dis + n);
  while (r - l > eps) {
    double mid = (l + r) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  std::cout << std::fixed << std::setprecision(7) << l << '\n';
  return 0;
}
