#include <bits/stdc++.h>
using namespace std;
const int N = 500005;
int n, m, nxt[N][25], vis[N];
double x[N], y[N];
pair<double, double> seg[N];
const double pi = acos(-1);
int chk(double r) {
  for (int i = 1; i <= n; ++i) {
    double angle = atan2(y[i], x[i]);
    double dt = acos(min(1.0, r / sqrt(x[i] * x[i] + y[i] * y[i])));
    seg[i].first = angle - dt;
    seg[i].second = angle + dt;
  }
  int nn = 2 * n;
  sort(seg + 1, seg + n + 1);
  for (int i = 1; i <= n; ++i) {
    seg[n + i].first = seg[i].first + 2 * pi;
    seg[n + i].second = seg[i].second + 2 * pi;
  }
  double mr = 1e60;
  for (int i = 1; i <= nn; ++i) vis[i] = 1;
  for (int i = nn; i >= 1; --i) {
    if (seg[i].second >= mr)
      vis[i] = 0;
    else
      mr = seg[i].second;
  }
  nn = 0;
  for (int i = 1; i <= n; ++i)
    if (vis[i]) seg[++nn] = seg[i];
  for (int i = 1; i <= nn; ++i)
    seg[i + nn] = make_pair(seg[i].first + 2 * pi, seg[i].second + 2 * pi);
  nn <<= 1;
  for (int i = 1; i <= nn; ++i) {
    seg[nn + i].first = seg[i].first + 2 * pi;
    seg[nn + i].second = seg[i].second + 2 * pi;
  }
  nn <<= 1;
  for (int i = 1, j = 1; i <= nn; ++i) {
    int cur = i;
    while (j <= nn && seg[j].first >= seg[cur].second) {
      if (seg[j].second < seg[cur].second) cur = j;
      ++j;
    }
    nxt[i][0] = j;
  }
  int j = 1;
  for (int i = 1; i <= nn; ++i) {
    while (j <= nn && seg[i].second >= seg[j].first) ++j;
    nxt[i][0] = j;
  }
  for (int j = 1; (1 << j) <= nn; ++j)
    for (int i = 1; i <= nn; ++i) nxt[i][j] = nxt[nxt[i][j - 1]][j - 1];
  for (int i = 1; i <= (nn >> 1) + 1; ++i) {
    int sum = 0;
    int t = i;
    int tmp = 0;
    for (int j = 20; j >= 0; --j)
      if (m & (1 << j)) t = nxt[t][j];
    if (!t || t >= i + (nn >> 1)) {
      return 1;
    }
  }
  return 0;
}
int main() {
  scanf("%d%d", &n, &m);
  double l = 0, r = 1e60;
  for (int i = 1; i <= n; ++i) {
    scanf("%lf%lf", &x[i], &y[i]);
    r = min(r, sqrt(x[i] * x[i] + y[i] * y[i]));
  }
  for (int k = 1; k <= 50; ++k) {
    double mid = (l + r) / 2;
    if (chk(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10f", l);
  return 0;
}
