#include <bits/stdc++.h>
using namespace std;
inline void pisz(int n) { printf("%d\n", n); }
double distsq[102], prob[102];
double dp[102][102];
int main() {
  int(n);
  scanf("%d", &(n));
  ;
  int(k);
  scanf("%d", &(k));
  ;
  int(e);
  scanf("%d", &(e));
  ;
  double wantedprob = 1 - e / 1000.0;
  int(x0);
  scanf("%d", &(x0));
  ;
  int(y0);
  scanf("%d", &(y0));
  ;
  for (int(i) = 1; (i) <= (n); ++(i)) {
    int(x1);
    scanf("%d", &(x1));
    ;
    int(y1);
    scanf("%d", &(y1));
    ;
    double odlx = x1 - x0;
    double odly = y1 - y0;
    distsq[i] = odlx * odlx + odly * odly;
  }
  const double eps = 0.00000000001;
  double a = 0, b = 4000;
  while (b - a > eps) {
    double r = (a + b) / 2;
    for (int(i) = 1; (i) <= (n); ++(i)) {
      if (distsq[i] <= r * r)
        prob[i] = 1;
      else
        prob[i] = exp(1 - distsq[i] / (r * r));
    }
    dp[0][0] = 1;
    for (int i = 1; i <= n; ++i) {
      dp[i][0] = dp[i - 1][0] * (1 - prob[i]);
      for (int j = 1; j <= i; ++j) {
        dp[i][j] = dp[i - 1][j] * (1 - prob[i]) + dp[i - 1][j - 1] * prob[i];
      }
    }
    double prob = 0;
    for (int j = k; j <= n; ++j) prob += dp[n][j];
    if (prob >= wantedprob)
      b = r;
    else
      a = r;
  }
  printf("%.11lf\n", a);
}
