#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void read(T &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  x *= f;
}
template <class T>
inline void umin(T &x, T y) {
  x = x < y ? x : y;
}
template <class T>
inline void umax(T &x, T y) {
  x = x > y ? x : y;
}
const int N = 266666;
const double eps = 1e-11;
int n, m, fa[17][N];
pair<int, int> a[N];
pair<double, double> s[N];
double b[N];
double getlen(pair<int, int> a) {
  return sqrt(1ll * a.first * a.first + 1ll * a.second * a.second);
}
bool cmp(const pair<double, double> &x, const pair<double, double> &y) {
  return x.second < y.second;
}
bool ck(double R) {
  int len = 0;
  for (register int i = (1); i <= (n); i++) {
    double ang = atan2(a[i].second, a[i].first), alpha = acos(R / getlen(a[i]));
    double x = ang - alpha, y = ang + alpha;
    if (x < -acos(-1)) x += 2 * acos(-1);
    if (y > acos(-1)) y -= 2 * acos(-1);
    if (x > y) swap(x, y);
    if (y - x <= acos(-1))
      s[++len] = make_pair(x + 2 * acos(-1), y + 2 * acos(-1));
    else
      s[++len] = make_pair(y, x + 2 * acos(-1));
  }
  sort(s + 1, s + len + 1, cmp);
  int sz = 1;
  for (register int i = (2); i <= (len); i++)
    if (s[i].first > s[sz].first) s[++sz] = s[i];
  len = sz;
  for (int i = 1, j = 1; i <= len; i++) {
    while (j <= len && s[j].first <= s[i].second) j++;
    fa[0][i] = j;
  }
  fa[0][len + 1] = len + 1;
  for (register int i = (1); i <= (16); i++)
    for (register int j = (1); j <= (len + 1); j++)
      fa[i][j] = fa[i - 1][fa[i - 1][j]];
  if (s[len].first <= acos(-1)) return 1;
  sz = 0;
  for (register int i = (1); i <= (len); i++) {
    if (s[i].first <= acos(-1) && s[i].first + 2 * acos(-1) >= s[len].first)
      b[++sz] = s[i].first + 2 * acos(-1);
  }
  b[sz + 1] = 1e10;
  for (register int i = (1); i <= (sz + 1); i++)
    if (b[i] > s[len].first) {
      for (register int j = (sz); j >= (i); j--) b[j + 1] = b[j];
      b[i] = s[len].first;
      sz++;
      break;
    }
  for (int i = 1, j = 1; i <= sz; i++) {
    while (j <= len && s[j].first <= b[i] - 2 * acos(-1) + eps) j++;
    int u = j;
    for (register int k = (0); k <= (16); k++)
      if ((m - 1) >> k & 1) u = fa[k][u];
    if (u > len || s[u].second >= b[i] - eps) {
      return 1;
    }
  }
  return 0;
}
int main() {
  read(n);
  read(m);
  double d = 1e18;
  for (register int i = (1); i <= (n); i++)
    read(a[i].first), read(a[i].second), umin(d, getlen(a[i]));
  if (d < 1e-7) {
    printf("%.9lf\n", d);
    return 0;
  }
  double L = 0, R = d - 1e-7;
  while (R - L >= 1e-7) {
    double mid = (L + R) / 2;
    if (ck(mid))
      L = mid;
    else
      R = mid;
  }
  printf("%.9lf\n", L);
  return 0;
}
