#include <bits/stdc++.h>
using namespace std;
struct point {
  int x, y, dis;
  point(int x = 0, int y = 0, int dis = 0) : x(x), y(y), dis(dis) {}
};
int dist(point a, point b) {
  return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y);
}
point bomb, a[110];
int n, K, ep;
double p[110], dp[110][110];
double sq(double u) { return u * u; }
bool check(double radius) {
  if (radius < 1e-9) {
    for (int i = (1); i <= (n); i++)
      if (a[i].x == bomb.x && a[i].y == bomb.y)
        p[i] = 1;
      else
        p[i] = 0;
  }
  for (int i = (1); i <= (n); i++)
    if (a[i].dis <= sq(radius))
      p[i] = 1;
    else
      p[i] = exp(1 - a[i].dis / sq(radius));
  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++)
    for (int j = (0); j <= (i); j++) {
      dp[i][j] = dp[i - 1][j] * (1 - p[i]);
      if (j) dp[i][j] += dp[i - 1][j - 1] * p[i];
    }
  double prob = 0;
  for (int i = (K - 1); i >= (0); i--) prob += dp[n][i];
  return prob * 1000 <= ep;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(NULL);
  cin >> n;
  cin >> K >> ep;
  cin >> bomb.x >> bomb.y;
  for (int i = (1); i <= (n); i++) {
    cin >> a[i].x >> a[i].y;
    a[i].dis = dist(a[i], bomb);
  }
  double dau = 0, cuoi = 3000, mid;
  for (int tes = (1); tes <= (300); tes++) {
    mid = (dau + cuoi) / 2;
    if (check(mid))
      cuoi = mid;
    else
      dau = mid;
  }
  cout << fixed << setprecision(9) << cuoi;
  return 0;
}
