#include <bits/stdc++.h>
using namespace std;
int n;
int K;
double e;
vector<pair<double, double> > casas;
double memo[102][102];
double go(int pos, int destroyed, double R, double x0, double y0) {
  if (pos == casas.size()) {
    if (destroyed >= K) {
      return 1.0;
    } else {
      return 0.0;
    }
  }
  if (memo[pos][destroyed] > -1.0) {
    return memo[pos][destroyed];
  }
  double dcuad = (casas[pos].first - x0) * (casas[pos].first - x0) +
                 (casas[pos].second - y0) * (casas[pos].second - y0);
  if (dcuad < 1E-10) {
    return go(pos + 1, destroyed + 1, R, x0, y0);
  } else if (R < 1E-10)
    return go(pos + 1, destroyed, R, x0, y0);
  double p = 1.0;
  if (dcuad > R * R) p = exp(1.0 - (dcuad) / R / R);
  double val1 = p * go(pos + 1, destroyed + 1, R, x0, y0);
  double val2 = (1.0 - p) * go(pos + 1, destroyed, R, x0, y0);
  return memo[pos][destroyed] = val1 + val2;
}
double solve(double r, double x0, double y0) {
  for (int i = 0; i < 101; i++) {
    for (int j = 0; j < 101; j++) {
      memo[i][j] = -2.0;
    }
  }
  double p = go(0, 0, r, x0, y0);
  return p;
}
int main() {
  cin >> n;
  cin >> K >> e;
  double x0, y0;
  cin >> x0 >> y0;
  for (int i = 0; i < n; i++) {
    double x, y;
    cin >> x >> y;
    casas.push_back(make_pair(x, y));
  }
  double lo = 0.0;
  double hi = 3000.0;
  int veces = 200;
  double res = 0.0;
  while (veces--) {
    double r = lo + (hi - lo) / 2.0;
    double p = solve(r, x0, y0);
    if (e / 1000.0 > (1.0 - p - 1E-10)) {
      res = r;
      hi = r;
    } else {
      lo = r;
    }
  }
  double t = solve(3.84257761518762740, x0, y0);
  cout << setprecision(10) << fixed << res << endl;
  return 0;
}
