#include <bits/stdc++.h>
using namespace std;
struct pt {
  int x, y;
  double d, p;
};
double P(pt &p, double R) {
  return p.d <= R + 1e-9 ? 1 : exp(1 - (p.d / R) * (p.d / R));
}
int main() {
  double R = 0;
  int N, K;
  double e;
  cin >> N >> K >> e;
  pt p0, pts[N];
  cin >> p0.x >> p0.y;
  for (int i = 0; i < N; i++) {
    cin >> pts[i].x >> pts[i].y;
    pts[i].d = sqrt((pts[i].x - p0.x) * (pts[i].x - p0.x) +
                    (pts[i].y - p0.y) * (pts[i].y - p0.y));
  }
  double lr = 0, rr = 10000;
  while (lr - rr < -1e-9) {
    R = (lr + rr) / 2;
    for (int i = 0; i < N; i++) pts[i].p = P(pts[i], R);
    double pm[N][K];
    for (int k = 0; k < K; k++) pm[0][k] = 0;
    pm[0][0] = 1 - pts[0].p;
    pm[0][1] = pts[0].p;
    for (int i = 1; i < N; i++) {
      pm[i][0] = (1 - pts[i].p) * pm[i - 1][0];
      for (int k = 1; k < K; k++)
        pm[i][k] = pts[i].p * pm[i - 1][k - 1] + (1 - pts[i].p) * pm[i - 1][k];
    }
    double p = 0;
    for (int k = 0; k < K; k++) p += pm[N - 1][k];
    if (p * 1000 > e)
      lr = R;
    else
      rr = R;
  }
  cout << setprecision(10) << R;
  return 0;
}
