#include <bits/stdc++.h>
using namespace std;
inline double sqr(double first) { return first * first; }
inline double dist(pair<int, int> X, pair<int, int> Y) {
  return sqrt(sqr(X.first - Y.first) + sqr(X.second - Y.second));
}
int main(int argc, char **argv) {
  int N, K, err;
  cin >> N >> K >> err;
  int X0, Y0;
  cin >> X0 >> Y0;
  vector<pair<int, int> > P(N);
  for (int i = (0); i < (N); ++i) cin >> P[i].first >> P[i].second;
  double lo = 0, hi = 1e30, res = 1e30;
  for (int T = (0); T < (5000); ++T) {
    double mi = (lo + hi) / 2.;
    double r = mi;
    vector<double> V(N, 0.);
    for (int i = (0); i < (N); ++i) {
      double d = dist(P[i], make_pair(X0, Y0));
      if (fabs(r) < 1e-8)
        V[i] = fabs(d) < 1e-8;
      else if (r - d > -1e-8)
        V[i] = 1;
      else
        V[i] = exp(1. - d * d / (r * r));
    }
    double DP[N][N];
    memset(DP, 0, sizeof(DP));
    DP[0][0] = 1 - V[0];
    DP[0][1] = V[0];
    for (int i = (1); i < (N); ++i)
      for (int j = (0); j < (N); ++j)
        DP[i][j] += DP[i - 1][j] * (1. - V[i]),
            DP[i][j + 1] += DP[i - 1][j] * V[i];
    double prob = 0;
    for (int i = (0); i < (K); ++i) prob += DP[N - 1][i];
    if (err / 1000. - prob > -1e-8) {
      if (res - r > 1e-8) res = r;
      hi = mi;
    } else
      lo = mi;
  }
  printf("%.20f\n", res);
  return 0;
}
