#include <bits/stdc++.h>
using namespace std;
const long double PI = acos(-1.0);
const int N = 100005;
const int K = 18;
int n, m, s, ind[K][N << 2];
long double X[N], Y[N], D[N], alpha[N];
pair<long double, long double> arr[N << 2];
inline pair<long double, long double> get(int i, long double x) {
  long double theta = acos(x / D[i]);
  return {alpha[i] - theta, alpha[i] + theta};
}
inline bool check(long double x) {
  for (int i = 0; i < n; i++) {
    arr[i] = get(i, x);
    if (arr[i].second >= 2 * PI) {
      arr[i].first -= 2 * PI;
      arr[i].second -= 2 * PI;
    }
  }
  sort(arr, arr + n,
       [&](pair<long double, long double> p, pair<long double, long double> q) {
         return p.second < q.second;
       });
  for (int i = 0; i < n; i++) {
    arr[i + n] = arr[i];
    arr[i + n].first += 2 * PI;
    arr[i + n].second += 2 * PI;
  }
  for (int i = 0, j = 0; i < s; i++) {
    while (j + 1 < s && arr[j + 1].first <= arr[i].second) j++;
    ind[0][i] = j;
  }
  for (int k = 1; k < K; k++) {
    for (int i = 0; i < s; i++) {
      if (ind[k - 1][i] + 1 < s) {
        ind[k][i] = ind[k - 1][ind[k - 1][i] + 1];
      } else {
        ind[k][i] = s - 1;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    int j = i;
    for (int k = K - 1; k >= 0; k--) {
      if ((m >> k) & 1) {
        j = ind[k][j] + 1;
      }
      if (j == s) break;
    }
    if (j >= i + n) return true;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  long double lo = 0, hi = 1e9;
  for (int i = 0; i < n; i++) {
    cin >> X[i] >> Y[i];
    D[i] = sqrt(X[i] * X[i] + Y[i] * Y[i]);
    alpha[i] = atan2(Y[i], X[i]);
    if (alpha[i] < 0) alpha[i] += 2 * PI;
    hi = min(hi, D[i]);
  }
  if (hi < 1e-6) {
    cout << 0.0 << '\n';
    exit(0);
  }
  s = (n << 1);
  for (int iter = 0; iter < 60; iter++) {
    long double mi = (lo + hi) / 2;
    if (check(mi))
      lo = mi;
    else
      hi = mi;
  }
  long double answer = (lo + hi) / 2;
  cout << setprecision(30) << answer << '\n';
  return 0;
}
