#include <bits/stdc++.h>
using namespace std;
const int N = 100101;
const double PI = acos(-1);
const double eps = 1e-9;
int f[N], g[N], tmp[N], n, m;
double L[N], ang[N];
pair<double, double> a[N], b[N * 2];
bool chk(double lim) {
  int cnt = 0;
  for (int i = 1; i <= n; ++i) {
    double t = acos(lim / L[i]);
    double l = ang[i] - t, r = ang[i] + t;
    if (r > 2 * PI) l -= 2 * PI, r -= 2 * PI;
    b[cnt++] = make_pair(r, l);
    b[cnt++] = make_pair(r + 2 * PI, l + 2 * PI);
  }
  sort(b, b + cnt);
  for (int i = 0, j = 0; i < n; ++i) {
    for (; j < cnt && b[j].second <= b[i].first; ++j)
      ;
    f[i] = j;
    g[i] = i;
  }
  for (int i = 0; (1 << i) <= m; ++i) {
    if (m >> i & 1) {
      for (int j = 0; j < n; ++j) {
        tmp[j] = g[f[j] % n] + f[j] - f[j] % n;
        if (tmp[j] >= n + j) return 1;
      }
      memcpy(g, tmp, sizeof g);
    }
    for (int j = 0; j < n; ++j) tmp[j] = f[f[j] % n] + f[j] - f[j] % n;
    memcpy(f, tmp, sizeof f);
  }
  return 0;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= n; ++i)
    cin >> a[i].first >> a[i].second,
        L[i] = sqrt(a[i].first * a[i].first + a[i].second * a[i].second),
        ang[i] = atan2(a[i].second, a[i].first);
  double l = 0, r = *min_element(L + 1, L + n + 1);
  while (r - l > eps) {
    double mid = l + (r - l) / 2;
    if (chk(mid))
      l = mid;
    else
      r = mid;
  }
  cout << fixed << setprecision(8) << (l + r) / 2 << '\n';
  return 0;
}
