#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target( \
    "avx,avx2,fma,sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long MOD = 1e9 + 7;
long double eps = 1e-8;
const long double PI = 4 * atan(1);
const int N = 500000;
pair<long double, long double> a[N];
long long n;
long long check(long double r) {
  vector<pair<long double, long double> > b;
  for (int i = 0; i < n; i++) {
    long double ugl = acos(r / a[i].second);
    b.push_back({a[i].first - ugl, a[i].first + ugl});
    while (b[b.size() - 1].first < 0) {
      b[b.size() - 1].first += 2 * PI;
      b[b.size() - 1].second += 2 * PI;
    }
  }
  for (int i = 0; i < n; i++) {
    b.push_back(b[i]);
    b.back().first += 2 * PI;
    b.back().second += 2 * PI;
  }
  sort(b.begin(), b.end());
  vector<pair<long double, long double> > c;
  long double rr = b[2 * n - 1].second;
  for (int i = 2 * n - 2; i > -1; i--) {
    if (b[i].second < rr) {
      rr = b[i].second;
      if (b[i].first < 2 * PI) {
        c.push_back(b[i]);
      }
    }
  }
  reverse(c.begin(), c.end());
  long long m = c.size();
  for (int i = 0; i < m; i++) {
    c.push_back(c[i]);
    c.back().first += 2 * PI;
    c.back().second += 2 * PI;
  }
  vector<long long> g(m * 2);
  long long nw = 0;
  for (int i = 0; i < m; i++) {
    while (c[nw].first <= c[i].second) {
      nw++;
    }
    g[i] = nw;
    g[i + m] = nw + m;
  }
  long long ans = 0;
  long long cur = 0;
  vector<long long> ch;
  while (cur < 0 + m) {
    long long cur2 = cur;
    while (cur2 < g[cur]) {
      if (cur2 + 1 < m && g[cur2] != g[cur2 + 1]) {
        ch.push_back(cur2 + 1);
      }
      cur2++;
    }
    cur = g[cur];
    ans++;
  }
  for (auto j : ch) {
    long long ans0 = 0;
    long long tt = j;
    while (tt < m + j) {
      tt = g[tt];
      ans0++;
    }
    ans = min(ans0, ans);
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0),
      cout << fixed << setprecision(20);
  long long m;
  cin >> n >> m;
  long double R = MOD;
  for (int i = 0; i < n; i++) {
    long long x, y;
    cin >> x >> y;
    a[i] = {atan2(y, x), sqrt(x * x + y * y)};
    R = min(a[i].second, R);
  }
  sort(a, a + n);
  long double L = 0;
  while (R - L > eps) {
    long double mid = (R + L) / 2;
    if (check(mid) <= m) {
      L = mid;
    } else {
      R = mid;
    }
  }
  cout << L;
}
