#include <bits/stdc++.h>
using namespace std;
long n, k, p0, i;
double xx, yy, mind, maxd, midd, dis[2000], x[2000], y[2000];
double p[110];
double dp[110][110];
bool pd(double jl) {
  long i, j;
  for (i = 1; i <= n; i++) {
    if (dis[i] <= jl)
      p[i] = 1;
    else
      p[i] = exp(1 - dis[i] / jl * dis[i] / jl);
  }
  for (i = 0; i <= n; i++) dp[i][0] = 1;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= i - 1; j++)
      dp[i][j] = dp[i - 1][j - 1] * p[i] + dp[i - 1][j] * (1 - p[i]);
    dp[i][i] = dp[i - 1][i - 1] * p[i];
  }
  if (dp[n][k] * 1000 >= p0)
    return true;
  else
    return false;
}
int main(void) {
  scanf("%d%d%d", &n, &k, &p0);
  p0 = 1000 - p0;
  scanf("%lf%lf", &xx, &yy);
  maxd = 0;
  for (i = 1; i <= n; i++) {
    scanf("%lf%lf", &x[i], &y[i]);
    dis[i] = sqrt((x[i] - xx) * (x[i] - xx) + (y[i] - yy) * (y[i] - yy));
    if (dis[i] > maxd) maxd = dis[i];
  }
  mind = 0;
  while (maxd - mind > 0.0000000001) {
    midd = (mind + maxd) / 2;
    if (pd(midd))
      maxd = midd;
    else
      mind = midd;
  }
  printf("%.9f\n", mind);
}
