#include <bits/stdc++.h>
using namespace std;
const double E = 1e-8;
bool check(vector<double>& dists, double eps, double r, int K) {
  double p = 1;
  r = r * r;
  vector<vector<double> > tbl(dists.size() + 1,
                              vector<double>(dists.size() + 1));
  tbl[0][0] = 1;
  for (int i = 1; i < tbl.size(); ++i) {
    double p = dists[i - 1] > r ? exp(1 - dists[i - 1] / r) : 1;
    tbl[i][0] = tbl[i - 1][0] * (1 - p);
    for (int j = 1; j < tbl[i].size(); ++j) {
      tbl[i][j] = tbl[i - 1][j - 1] * p + tbl[i - 1][j] * (1 - p);
    }
  }
  double res = 0;
  for (int i = K; i <= dists.size(); ++i) {
    res += tbl[dists.size()][i];
  }
  return res >= 1 - eps;
}
int main() {
  int N, K;
  double eps, x0, y0;
  cin >> N >> K >> eps >> x0 >> y0;
  eps /= 1000;
  vector<double> dists(N);
  for (int i = 0; i < N; ++i) {
    double x, y;
    cin >> x >> y;
    dists[i] = (x - x0) * (x - x0) + (y - y0) * (y - y0);
  }
  sort(dists.begin(), dists.end());
  double minr = 0, maxr = sqrt(dists.back()) + E;
  while (minr + E < maxr) {
    double r = (minr + maxr) / 2;
    if (check(dists, eps, r, K)) {
      maxr = r;
    } else {
      minr = r;
    }
  }
  cout << setprecision(12) << fixed << maxr << endl;
}
