#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int maxn = 1e5 + 5;
int n, m;
double x[maxn], y[maxn];
double dis(int w) { return sqrt(x[w] * x[w] + y[w] * y[w]); }
pair<double, double> seq[maxn << 1];
int f[maxn << 1][20];
double cal(int w) {
  return y[w] > 0 ? acos(x[w] / dis(w)) : pi * 2 - acos(x[w] / dis(w));
}
bool chk(double r) {
  for (int i = 1; i <= n; i++) {
    double angle = acos(r / dis(i)), w = cal(i) - angle;
    if (w < 0) w += pi * 2;
    seq[i] = make_pair(w, angle * 2);
  }
  sort(seq + 1, seq + 1 + n);
  for (int i = 1; i <= n; i++)
    seq[i + n] = make_pair(seq[i].first + pi * 2, seq[i].second);
  double mini = 1e10;
  int pt = n * 2;
  for (int i = n * 2; i; i--) {
    mini = min(mini, seq[i].first + seq[i].second);
    while (seq[pt].first > mini) pt--;
    if (pt < n * 2)
      f[i][0] = pt + 1;
    else
      f[i][0] = -1;
  }
  for (int j = 1; j <= 17; j++)
    for (int i = 1; i <= n * 2; i++)
      if (f[i][j - 1] == -1)
        f[i][j] = -1;
      else
        f[i][j] = f[f[i][j - 1]][j - 1];
  for (int i = 1; i <= n; i++) {
    int p = i;
    for (int j = 0; j <= 16; j++)
      if (m & 1 << j) {
        p = f[p][j];
        if (p == -1 || p >= i + n) return true;
      }
  }
  return false;
}
int main() {
  cin >> n >> m;
  double l = 0, r = 1e10;
  for (int i = 1; i <= n; i++) cin >> x[i] >> y[i], r = min(r, dis(i));
  while (fabs(l - r) > 1e-8) {
    double mid = (l + r) / 2;
    if (chk(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.8lf\n", l);
  return 0;
}
