#include <bits/stdc++.h>
using namespace std;
const int N = 1228;
int n, k;
long double dp[N][N];
long double d[N];
long double func(long double r) {
  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 = 0; i < n; i++) {
    for (int j = 0; j <= n; j++) {
      if (d[i] <= r) {
        dp[i + 1][j + 1] += dp[i][j];
      } else {
        long double p = exp(1.0 - (d[i] * d[i]) / (r * r));
        dp[i + 1][j + 1] += p * dp[i][j];
        dp[i + 1][j] += (1 - p) * dp[i][j];
      }
    }
  }
  long double ans = 0;
  for (int i = k; i <= n; i++) {
    ans += dp[n][i];
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  long double e;
  cin >> k >> e;
  e /= 1000;
  e = 1 - e;
  long double x0, y0;
  cin >> x0 >> y0;
  for (int i = 0; i < n; i++) {
    long double x, y;
    cin >> x >> y;
    d[i] = sqrt((x0 - x) * (x0 - x) + (y0 - y) * (y0 - y));
  }
  long double l = 0, r = 1e5;
  while (r - l > 1e-6) {
    long double c = (l + r) / 2.0;
    if (func(c) < e)
      l = c;
    else
      r = c;
  }
  cout << fixed << setprecision(20) << (l + r) / 2.0 << "\n";
  return 0;
}
