#include <bits/stdc++.h>
using namespace std;
int d[200000];
pair<long long, long long> p[100000];
long long operator*(pair<long long, long long> a,
                    pair<long long, long long> b) {
  return a.first * b.first + a.second * b.second;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, m;
  cin >> n >> m;
  double low = 0, high = 1e9;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first >> p[i].second;
    high = min(high, sqrt(p[i] * p[i]));
  }
  for (int it = 0; high && it < 100; it++) {
    double r = (low + high) / 2;
    vector<pair<double, double>> q;
    for (int i = 0; i < n; i++) {
      double d = sqrt(p[i] * p[i]);
      double a = atan2(p[i].second, p[i].first), b = acos(r / d);
      double first = a + b;
      while (first < 0) first += 3.14159265358979323846 * 2;
      while (first >= 3.14159265358979323846 * 2)
        first -= 3.14159265358979323846 * 2;
      q.emplace_back(first, first - b * 2);
    }
    sort(q.begin(), q.end());
    for (int i = 0; i < n; i++)
      q.push_back({q[i].first + 3.14159265358979323846 * 2,
                   q[i].second + 3.14159265358979323846 * 2});
    deque<pair<double, int>> deq;
    for (int i = 0; i < n * 2; i++) {
      while (deq.size() && q[i].second > deq.front().first) {
        d[deq.front().second] = i - deq.front().second;
        deq.pop_front();
      }
      deq.push_back({q[i].first, i});
    }
    int mindi = 0, mind = n;
    for (int i = 0; i < n; i++) {
      if (d[i] < mind) {
        mind = d[i];
        mindi = i;
      }
    }
    int need = 1e9;
    for (int a = mindi; a <= mindi + d[mindi]; a++) {
      int c = 0, dist = 0;
      int i = a % n;
      while (dist < n) {
        dist += d[i];
        i += d[i];
        if (i >= n) i -= n;
        c++;
      }
      need = min(need, c);
    }
    if (need > m)
      high = r;
    else
      low = r;
  }
  cout << setprecision(20) << high << endl;
}
