#include <bits/stdc++.h>
using namespace std;
struct point {
  long long x, y;
  double angle, dist;
  point() : x(0), y(0) {}
  point(long long _x, long long _y) : x(_x), y(_y) {}
  bool top_half() const { return y > 0 || (y == 0 && x > 0); }
  long long norm() const { return (long long)x * x + (long long)y * y; }
  bool operator<(const point &other) const { return angle < other.angle; }
};
const double PI = acos(-1.0);
const double DOUBLE_INF = 1e50;
const int BINARY_SEARCH = 24;
struct interval {
  double start, end;
  interval(double _start = 0, double _end = 0) : start(_start), end(_end) {}
  bool operator<(const interval &other) const { return start < other.start; }
};
int N, M;
vector<point> points;
bool possible(double radius) {
  static vector<interval> intervals;
  intervals.resize(2 * N);
  for (int i = 0; i < N; i++) {
    double angle = points[i].angle;
    double diff = acos(radius / points[i].dist);
    double start = angle - diff, end = angle + diff;
    if (start < 0) {
      start += 2 * PI;
      end += 2 * PI;
    }
    intervals[i] = interval(start, end);
  }
  sort(intervals.begin(), intervals.begin() + N);
  for (int i = 0; i < N; i++)
    intervals[N + i] =
        interval(intervals[i].start + 2 * PI, intervals[i].end + 2 * PI);
  double lowest = DOUBLE_INF;
  for (int i = 2 * N - 1; i >= 0; i--) {
    lowest = min(lowest, intervals[i].end);
    intervals[i].end = lowest;
  }
  static vector<int> jump, next_jump;
  jump.resize(2 * N + 1);
  next_jump.resize(2 * N + 1);
  jump[2 * N] = next_jump[2 * N] = 2 * N;
  for (int i = 0, j = 0; i < N; i++) {
    while (j < 2 * N && intervals[j].start < intervals[i].end) j++;
    jump[i] = j;
  }
  for (int i = 0; i < N; i++) jump[N + i] = min(jump[i] + N, 2 * N);
  static vector<int> position;
  position.resize(N);
  for (int i = 0; i < N; i++) position[i] = i;
  for (int k = 0; 1 << k <= M; k++) {
    if (k > 0) {
      for (int i = 0; i < 2 * N; i++) next_jump[i] = jump[jump[i]];
      swap(jump, next_jump);
    }
    if (M >> k & 1) {
      for (int i = 0; i < N; i++) {
        position[i] = jump[position[i]];
        if (position[i] >= N + i) return true;
      }
    }
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout << setprecision(16);
  cin >> N >> M;
  M = min(M, 6);
  points.resize(N);
  double closest = DOUBLE_INF;
  for (point &p : points) {
    cin >> p.x >> p.y;
    if (p.x == 0 && p.y == 0) {
      cout << 0 << '\n';
      return 0;
    }
    p.angle = atan2(p.y, p.x);
    p.dist = sqrt(p.norm());
    closest = min(closest, p.dist);
  }
  sort(points.begin(), points.end());
  double low = 0, high = closest;
  if (possible(1))
    low = 1;
  else
    high = 1;
  for (int iter = 0; iter < BINARY_SEARCH; iter++) {
    double mid = high <= 1 ? (low + high) / 2 : sqrt(low * high);
    if (possible(mid))
      low = mid;
    else
      high = mid;
  }
  cout << low << '\n';
}
