#include <bits/stdc++.h>
using namespace std;
double dp[101][101];
double dis[101];
int main() {
  int n;
  scanf("%d", &n);
  int k, e, x0, y0;
  cin >> k >> e >> x0 >> y0;
  for (int i = 1; i <= n; i++) {
    double x, y;
    cin >> x >> y;
    dis[i] = (x0 - x) * (x0 - x) + (y0 - y) * (y0 - y);
    ;
  }
  double lo = 0, hi = 1e5, p;
  while (fabs(lo - hi) > 1e-9) {
    double mid = (lo + hi) / 2.0;
    double r = mid * mid;
    for (int i = 0; i <= n; i++) {
      for (int j = 0; j <= n; j++) dp[i][j] = 0;
    }
    dp[0][0] = 1;
    for (int i = 1; i <= n; i++) {
      if (dis[i] > r)
        p = exp(1 - dis[i] / r);
      else
        p = 1.0;
      for (int j = 0; j <= i; j++) {
        dp[i][j] += dp[i - 1][j - 1] * p + dp[i - 1][j] * (1 - p);
      }
    }
    double h = 0;
    for (int i = 0; i < k; i++) {
      h += dp[n][i];
    }
    if (h * 1000 > e)
      lo = mid;
    else
      hi = mid;
  }
  printf("%.10lf", lo);
  return 0;
}
