#include <bits/stdc++.h>
using namespace std;
inline double abv(double x) { return x < 0 ? -x : x; }
inline double acr(double a, double b, double c, double d, double x, double y) {
  double X = (d - b) / (a - c), Y = a * X + b;
  return sqrt((X - x) * (X - x) + (Y - y) * (Y - y));
}
inline double dist(double a, double b, double x, double y) {
  return abv(x * a + b - y) / sqrt(1 + a * a);
}
inline void acr(double& X, double& Y, double a, double b, double x, double y,
                double r) {
  double A = a * a + 1, B = 2 * (a * b - a * y - x),
         C = x * x + b * b + y * y - 2 * b * y - r * r,
         D = (-B - sqrt(B * B - 4 * A * C)) * 0.5 / A,
         E = (-B + sqrt(B * B - 4 * A * C)) * 0.5 / A;
  if ((X = r * atan2(D - x, D * a + b - y)) >
      (Y = r * atan2(E - x, E * a + b - y)))
    swap(X, Y);
}
int e[100001], f[100001], g[100001], i, j, k, m, n, o[100001], p[100001],
    q[100001], t;
double a[100001], b[100001], c[100001], d[100001], l, r, x, y;
bool h[100001];
inline void add(int u) {
  while (u <= t) g[u]++, u += u & -u;
}
inline void del(int u) {
  while (u <= t) g[u]--, u += u & -u;
}
inline int sum(int u) {
  int v = 0;
  while (u) v += g[u], u -= u & -u;
  return v;
}
inline bool cmp(int u, int v) { return d[u] < d[v]; }
inline unsigned int find(double s) {
  unsigned int z = 0;
  for (i = 1; i <= n; e[i] = i, e[n + i] = n + i, i++)
    if (h[i] = s - c[i] > -1e-8) acr(d[i], d[n + i], a[i], b[i], x, y, s);
  for (sort(e + 1, e + t + 1, cmp), i = 1; i <= t; i++) q[e[i]] = i;
  for (f[e[1]] = q[e[1]], i = 2; i <= t; i++)
    f[e[i]] = d[e[i]] - d[e[i - 1]] < 1e-8 ? f[e[i - 1]] : q[e[i]];
  for (i = j = 1, k = 0; i <= t;) {
    for (; j <= t && f[e[j]] == f[e[i]]; j++)
      if (e[j] <= n)
        h[e[j]] ? add(f[e[j]]), k++ : 0;
      else
        h[e[j] - n] ? z += k - sum(f[e[j] - n] - 1) - 1 : 0;
    for (; i < j; i++)
      if (e[i] > n && h[e[i] - n]) del(f[e[i] - n]), k--;
  }
  return z;
}
double u;
int v, w;
int main() {
  scanf("%d%lf%lf%d", &n, &x, &y, &m), r = 10000000000, t = n << 1, x /= 1000,
                                       y /= 1000;
  for (i = 1; i <= n; i++)
    scanf("%lf%lf", a + i, b + i),
        w += (c[i] = dist(a[i] /= 1000, b[i] /= 1000, x, y)) < 1e-8;
  if (w * (w - 1ll) >> 1 >= m) return 0 * puts("0.000000000");
  for (w = 100; w; w--)
    u = (l + r) * 0.5, find(u) < (unsigned int)m ? l = u : r = u;
  for (u = -r * (find(r) - m), i = j = 1; i <= t;) {
    for (; j <= t && f[e[j]] == f[e[i]]; j++)
      if (e[j] <= n)
        h[e[j]] ? * o = p[o[j] = *o] = j : 0;
      else if (h[e[j] - n])
        for (k = f[e[j] - n]; k; k = p[k])
          if (e[k] != e[j] - n)
            u += acr(a[e[j] - n], b[e[j] - n], a[e[k]], b[e[k]], x, y);
    for (; i < j; i++)
      if (e[i] > n && h[e[i] - n])
        p[o[q[e[i] - n]]] = p[q[e[i] - n]], o[p[q[e[i] - n]]] = o[q[e[i] - n]];
  }
  return 0 * printf("%.9lf\n", u);
}
