#include <bits/stdc++.h>
using namespace std;
int sq(int x) { return x * x; }
const long double EPS = 1e-9;
int main() {
  int n;
  cin >> n;
  int k, eps;
  cin >> k >> eps;
  int x0, y0;
  cin >> x0 >> y0;
  long double e = eps / 1000.;
  vector<double> d2;
  for (int i = 0; i < n; ++i) {
    int x, y;
    cin >> x >> y;
    d2.push_back(sq(x0 - x) + sq(y0 - y));
  }
  long double lo = 0;
  long double hi = 10000;
  while (hi - lo > EPS) {
    long double r = (lo + hi) / 2;
    long double r2 = r * r;
    vector<long double> p;
    if (r < EPS) {
      for (int i = 0; i < n; ++i) {
        if (d2[i] <= r2)
          p.push_back(1.);
        else
          p.push_back(0);
      }
    } else {
      for (int i = 0; i < n; ++i) {
        if (d2[i] <= r2)
          p.push_back(1.);
        else
          p.push_back(exp(1 - d2[i] / r2));
      }
    }
    vector<vector<long double> > dp(n + 1, vector<long double>(n + 1, 0));
    dp[0][0] = 1.;
    for (int i = 1; i <= n; ++i) {
      dp[i][0] = 1.;
      for (int j = 1; j <= n; ++j) {
        dp[i][j] = p[i - 1] * dp[i - 1][j - 1] + (1 - p[i - 1]) * dp[i - 1][j];
      }
    }
    if (dp[n][k] >= 1 - e)
      hi = r;
    else
      lo = r;
  }
  printf("%.12lf\n", (double)lo);
  return 0;
}
