#include <bits/stdc++.h>
using namespace std;
int eprintf(const char* format, ...) { return 0; }
struct pt {
  long double x, y;
  pt() {}
  pt(long double _x, long double _y) : x(_x), y(_y) {}
};
int n, k;
pt p0;
vector<pt> pts;
long double d[110][110];
long double getProb(int id, long double r) {
  long double dist = ((pts[id].x - p0.x) * (pts[id].x - p0.x)) +
                     ((pts[id].y - p0.y) * (pts[id].y - p0.y));
  if (fabs(r) < (long double)1e-11)
    return fabs(dist) < (long double)1e-11 ? 1.0 : 0.0;
  r *= r;
  if (dist <= r + (long double)1e-11) return 1.0;
  return exp(1.0 - dist / r);
}
long double get(long double r) {
  memset(d, 0, sizeof d);
  d[0][0] = 1;
  for (int i = 0; i < n; i++)
    for (int ck = 0; ck <= n; ck++) {
      long double pr = getProb(i, r);
      d[i + 1][ck] += d[i][ck] * (1 - pr);
      if (ck < n) d[i + 1][ck + 1] += d[i][ck] * pr;
    }
  long double res = 0;
  for (int ck = k; ck <= n; ck++) res += d[n][ck];
  return res;
}
int main() {
  double _need;
  while (scanf("%d%d%lf", &n, &k, &_need) >= 3) {
    long double need = (1000 - _need) / 1000.0;
    double x, y;
    scanf("%lf%lf", &x, &y);
    p0 = pt(x, y);
    pts = vector<pt>(n);
    for (int i = 0; i < n; i++) {
      scanf("%lf%lf", &x, &y);
      pts[i] = pt(x, y);
    }
    if (get(0) >= need - (long double)1e-11) {
      printf("0\n");
    } else {
      long double L = 0, R = 3000;
      while (L + 1e-10 < R) {
        long double M = (L + R) / 2.0;
        if (get(M) >= need - (long double)1e-11)
          R = M;
        else
          L = M;
      }
      printf("%.15lf\n", (double)R);
    }
    break;
  }
  return 0;
}
