#include <bits/stdc++.h>
using namespace std;
int n, k;
double p;
struct Node {
  double x, y;
  double l;
  bool operator<(const Node& a) const { return l < a.l; }
} node[105];
double xx, yy;
double pro[105];
double dp[105][105];
int main() {
  scanf("%d%d%lf", &n, &k, &p);
  p /= 1000;
  scanf("%lf%lf", &xx, &yy);
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf", &node[i].x, &node[i].y);
    node[i].l = sqrt((node[i].x - xx) * (node[i].x - xx) +
                     (node[i].y - yy) * (node[i].y - yy));
  }
  sort(node, node + n);
  double l = 0, r = node[k - 1].l;
  double mid;
  double ans;
  for (int o = 0; o < 10000; o++) {
    mid = (l + r) / 2;
    for (int i = 0; i < n; i++) {
      if (mid > node[i].l || fabs(mid - node[i].l) < 1e-6)
        pro[i + 1] = 1;
      else
        pro[i + 1] = pow(2.7182818284590452353602874713527,
                         1 - node[i].l * node[i].l / mid / mid);
    }
    ans = 0;
    dp[1][0] = 1 - pro[1];
    dp[1][1] = pro[1];
    for (int i = 2; i <= n; i++) {
      for (int j = 0; j <= i; j++) {
        dp[i][j] = dp[i - 1][j] * (1 - pro[i]);
        if (j - 1 >= 0) dp[i][j] += dp[i - 1][j - 1] * pro[i];
      }
    }
    for (int i = 0; i < k; i++) ans += dp[n][i];
    if (ans > p) l = mid;
    if (ans < p) r = mid;
  }
  printf("%.12lf\n", mid);
  return 0;
}
