#include <bits/stdc++.h>
using namespace std;
int inline read() {
  int num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
const int maxn = 100010, mod = 998244353;
const double PI = acos(-1.0);
int n, m;
double x[maxn], y[maxn];
double dist(double x, double y) { return sqrt(x * x + y * y); }
struct Node {
  double l, r;
} a[maxn << 1];
bool cmp(Node x, Node y) { return x.l < y.l; }
int jmp[maxn << 1][19];
bool check(double mid) {
  for (int i = 1; i <= n; i++) {
    double p = atan2(y[i], x[i]);
    double q = acos(mid / dist(x[i], y[i]));
    a[i].l = p - q;
    a[i].r = p + q;
    if (a[i].l < 0) {
      a[i].l += 2 * PI;
      a[i].r += 2 * PI;
    }
    a[i + n].l = a[i].l + 2 * PI;
    a[i + n].r = a[i].r + 2 * PI;
  }
  sort(a + 1, a + 2 * n + 1, cmp);
  int N = 2 * n, now = N;
  jmp[N][0] = N + 1;
  for (int i = 0; i <= 18; i++) jmp[N + 1][i] = N + 1;
  for (int i = N - 1; i >= 1; i--) {
    while (a[now].l > a[i].r) now--;
    jmp[i][0] = now + 1;
  }
  for (int i = 1; i <= 18; i++)
    for (int j = 1; j <= N; j++) jmp[j][i] = jmp[jmp[j][i - 1]][i - 1];
  for (int i = 1; i <= n; i++) {
    int now = i;
    for (int j = 18; j >= 0; j--)
      if (m & (1 << j)) now = jmp[now][j];
    if (now >= i + n) return 1;
  }
  return 0;
}
int main() {
  n = read();
  m = read();
  double l = 0, r = 2147483647;
  for (int i = 1; i <= n; i++) {
    x[i] = read();
    y[i] = read();
    r = min(r, dist(x[i], y[i]));
  }
  if (r < 1e-6) {
    cout << 0 << endl;
    return 0;
  }
  int T = 50;
  while (T--) {
    double mid = (l + r) / 2;
    if (check(mid))
      l = mid;
    else
      r = mid;
  }
  printf("%.10lf", l);
  return 0;
}
