#include <bits/stdc++.h>
using namespace std;
template <typename T>
void maxtt(T& t1, T t2) {
  t1 = max(t1, t2);
}
template <typename T>
void mintt(T& t1, T t2) {
  t1 = min(t1, t2);
}
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "URDL";
const long long MOD2 = (long long)998244353 * (long long)998244353;
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int& x, int y, int mod = 998244353) {
  assert(y >= 0);
  x += y;
  if (x >= mod) x -= mod;
  assert(x >= 0 && x < mod);
}
void et(int x = -1) {
  printf("%d\n", x);
  exit(0);
}
long long fastPow(long long x, long long y, int mod = 998244353) {
  long long ans = 1;
  while (y > 0) {
    if (y & 1) ans = (x * ans) % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd1(long long x, long long y) { return y ? gcd1(y, x % y) : x; }
struct Point {
  long long x, y;
  Point() {}
  Point(long long x, long long y) : x(x), y(y) {}
  long double abs() const { return hypot(x, y); }
  long double arg() const { return atan2(y, x); }
  Point operator*(double o) const { return Point(x * o, y * o); }
  Point operator+(const Point& o) const { return Point(x + o.x, y + o.y); }
  Point operator-(const Point& o) const { return Point(x - o.x, y - o.y); }
  Point operator/(double o) const { return Point(x / o, y / o); }
  bool operator<(const Point& o) const {
    return x < o.x - 1e-9 || (x < o.x + 1e-9 && y < o.y - 1e-9);
  }
  friend bool operator==(const Point& r1, const Point& r2) {
    return r1.x == r2.x && r1.y == r2.y;
  }
  Point scale(double o) const { return *this * (o / abs()); }
  Point rotY() const { return Point(-y, x); }
  Point rotX() const { return Point(y, -x); }
  long long cross(Point b) const { return x * b.y - b.x * y; }
  long long dot(Point b) const { return x * b.x + y * b.y; }
  long double disToSeg(Point& a, Point& b) {
    return fabs(((*this) - a).cross(b - a) / (b - a).abs());
  }
  pair<long long, long long> getVec() {
    if (x == 0) return {0, y > 0 ? 1 : -1};
    if (y == 0) return {x < 0 ? -1 : 1, 0};
    long long gg = gcd1(::abs(x), ::abs(y));
    long long px = x / gg, py = y / gg;
    return {px, py};
  }
  void readin() { scanf("%lld%lld", &x, &y); }
} p[100035];
pair<long double, long double> vp[100035 * 2];
int fa[100035 * 2][20];
bool ck(long double mid) {
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    long double the = p[i].arg();
    long double tmp = acos(mid / p[i].abs());
    long double L = the - tmp, R = the + tmp;
    if (L < 0) {
      L += acos(-1) * 2;
      R += acos(-1) * 2;
    }
    vp[i] = {L, R};
    vp[i + n] = {L + acos(-1) * 2, R + acos(-1) * 2};
  }
  sort(vp + 1, vp + 1 + n + n);
  int N = n + n;
  fa[N + 1][0] = N + 1;
  for (int i = N, j = N; i; i--) {
    while (vp[j].first > vp[i].second) j--;
    fa[i][0] = j + 1;
  }
  for (int j = 1; j < 20; j++)
    for (int i = 1; i <= N + 1; i++) fa[i][j] = fa[fa[i][j - 1]][j - 1];
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    int x = i;
    for (int j = 19; ~j; j--)
      if (m & (1 << j)) {
        x = fa[x][j];
      }
    if (x - i >= n) return 1;
  }
  return 0;
}
void fmain(int tid) {
  scanf("%d%d", &n, &m);
  long double l = 0, r = (1LL << 60);
  for (int(i) = 1; (i) <= (int)(n); (i)++) {
    p[i].readin();
    mintt(r, p[i].abs());
  }
  while (abs(l - r) > 1e-9) {
    long double mid = (l + r) / 2;
    if (ck(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10Lf\n", l);
}
int main() {
  int t = 1;
  for (int(i) = 1; (i) <= (int)(t); (i)++) {
    fmain(i);
  }
  return 0;
}
