#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.sync_with_stdio(false);
  cout.sync_with_stdio(false);
  int n, k, e;
  cin >> n >> k >> e;
  int x0, y0;
  cin >> x0 >> y0;
  vector<pair<int, int> > points(n);
  for (int i = (0); i < ((n)); ++i) cin >> points[i].first >> points[i].second;
  double l = 0, r = 5000;
  for (int iters = (0); iters < ((100)); ++iters) {
    double m = (l + r) / 2;
    double const EPS = 1e-7;
    vector<double> p(n);
    for (int i = (0); i < ((n)); ++i) {
      double d = sqrt(pow(points[i].first - x0, 2.0) +
                      pow(points[i].second - y0, 2.0));
      p[i] = 1;
      if (d > m) {
        if (m != 0) p[i] = exp(1 - pow(d / m, 2.0));
      }
    }
    vector<vector<double> > dp(n + 1, vector<double>(n + 1));
    dp[0][0] = 1.0;
    for (int i = (0); i < ((n)); ++i)
      for (int j = (0); j < ((n + 1)); ++j)
        if (dp[i][j]) {
          dp[i + 1][j] += dp[i][j] * (1 - p[i]);
          if (j != n) dp[i + 1][j + 1] += dp[i][j] * p[i];
        }
    double winning = 0;
    for (int i = (k); i < (n + 1); ++i) winning += dp[n][i];
    if (1 - winning <= e / 1000.0)
      r = m;
    else
      l = m;
  }
  cout << setprecision(7) << fixed << l << endl;
  return 0;
}
