#include <bits/stdc++.h>
using namespace std;
const int MAX = 120;
const double eps = 1e-8;
struct Node {
  double x, y;
} pt[MAX], center;
double dp[MAX][MAX], d[MAX], p[MAX];
double ep;
int n, k;
double sqr(double x) { return x * x; }
double operator*(const Node& a, const Node& b) {
  return sqrt(sqr(a.x - b.x) + sqr(a.y - b.y));
}
double calc(double d, double r) {
  if (d - r < eps) {
    return 1;
  } else {
    return exp(1.0 - sqr(d / r));
  }
}
double run(double r) {
  for (int i = 1; i <= n; i++) {
    p[i] = calc(d[i], r);
  }
  for (int i = 1; i <= n; i++) dp[0][i] = 0;
  dp[0][0] = 1;
  for (int i = 1; i <= n; i++) {
    dp[i][0] = dp[i - 1][0] * (1 - p[i]);
    for (int j = 1; j <= n; j++) dp[i][j] = 0;
    for (int j = 1; j <= i; j++) {
      dp[i][j] = dp[i - 1][j - 1] * p[i] + dp[i - 1][j] * (1 - p[i]);
    }
  }
  double ret = 0;
  for (int i = k; i <= n; i++) {
    ret += dp[n][i];
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  scanf("%d%lf", &k, &ep);
  ep = 1 - ep / 1000;
  scanf("%lf%lf", &center.x, &center.y);
  for (int i = 1; i <= n; i++) {
    scanf("%lf%lf", &pt[i].x, &pt[i].y);
    d[i] = pt[i] * center;
  }
  double l = 0, r = 1e4, mid, ans = 1e7;
  while (r - l > eps) {
    mid = (l + r) / 2;
    if (run(mid) - ep > eps) {
      r = mid;
      ans = mid;
    } else {
      l = mid;
    }
  }
  printf("%.12f\n", ans);
  return 0;
}
