#include <bits/stdc++.h>
using namespace std;
double d[128];
double p[128];
double prob[128][128];
int main() {
  int n;
  cin >> n;
  int k;
  double eps;
  cin >> k >> eps;
  eps /= 1000;
  double r1 = 0, r2 = 1e8;
  double xx, yy;
  cin >> xx >> yy;
  double xs, ys;
  for (int i = (0), _b(n); i < _b; ++i) {
    cin >> xs >> ys;
    d[i] = sqrt((xs - xx) * (xs - xx) + (ys - yy) * (ys - yy));
  }
  for (int it = (0), _b(1000); it < _b; ++it) {
    double r = (r1 + r2) / 2;
    for (int i = (0), _b(n); i < _b; ++i)
      if (d[i] <= r)
        p[i] = 1;
      else
        p[i] = exp(1 - d[i] * d[i] / r / r);
    memset(prob, 0, sizeof(prob));
    prob[0][0] = 1;
    for (int i = (0), _b(n); i < _b; ++i) {
      for (int j = (0), _b(i + 1); j < _b; ++j) {
        prob[i + 1][j + 1] += prob[i][j] * p[i];
        prob[i + 1][j] += prob[i][j] * (1 - p[i]);
      }
    }
    double f = 0;
    for (int i = k; i <= n; ++i) f += prob[n][i];
    if (f < 1 - eps)
      r1 = r;
    else
      r2 = r;
  }
  printf("%.13lf\n", (r1 + r2) / 2);
  return 0;
}
