#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-6, pi = acos(-1.00);
int n, m;
double cx, cy, ans;
struct line {
  double a, b;
};
line lines[55555];
struct segment {
  double ltheta, rtheta;
  int id;
  bool operator<(const segment &temp) const { return ltheta < temp.ltheta; }
};
segment sg[55555];
struct pp {
  int flag, id, nx;
  double theta;
  bool operator<(const pp &temp) const {
    if (theta == temp.theta) return flag < temp.flag;
    return theta < temp.theta;
  }
};
pp xx[110000];
struct qq {
  int id, ip;
  bool operator<(const qq &temp) const { return ip < temp.ip; }
};
set<qq> hs;
set<qq>::iterator it;
qq now;
int nxt[55555], pre[55555];
int cnt_sg, cnt_x, ix[155555], rt[110000];
int cnt_th;
int arr[110000];
void norm(double &theta) {
  while (theta <= -pi) theta += 2 * pi;
  while (theta > pi) theta -= 2 * pi;
}
int lowbit(int x) { return x & (-x); }
void insert(int id) {
  int flag = xx[id].flag;
  for (id = rt[xx[id].id] + 1; id <= cnt_x; id += lowbit(id)) arr[id] -= flag;
}
int query(int id) {
  int res = 0;
  for (id = rt[xx[id].id] + 1; id > 0; id -= lowbit(id)) res += arr[id];
  return res;
}
int check(double r, bool path_fou) {
  int res = 0, id, i, j, s, p, q;
  double alpha, theta, vv;
  cnt_sg = 0;
  for (i = 0; i < n; i++) {
    alpha = atan2(1., lines[i].a);
    vv = (cy - lines[i].b - lines[i].a * cx) /
         (r * sqrt(1 + lines[i].a * lines[i].a));
    if (vv < -1 || vv > 1) continue;
    theta = -acos(vv) - alpha;
    norm(theta);
    sg[cnt_sg].id = i;
    sg[cnt_sg].ltheta = theta;
    theta = acos(vv) - alpha;
    norm(theta);
    sg[cnt_sg++].rtheta = theta;
    if (sg[cnt_sg - 1].ltheta > sg[cnt_sg - 1].rtheta)
      swap(sg[cnt_sg - 1].ltheta, sg[cnt_sg - 1].rtheta);
  }
  cnt_x = 0;
  for (i = 0; i < cnt_sg; i++) {
    xx[cnt_x].theta = sg[i].ltheta;
    xx[cnt_x].id = i;
    xx[cnt_x++].flag = -1;
    xx[cnt_x].theta = sg[i].rtheta;
    xx[cnt_x].id = i;
    xx[cnt_x++].flag = 1;
  }
  sort(xx, xx + cnt_x);
  for (i = 0; i < cnt_x; i++) rt[xx[i].id] = i;
  for (i = 0; i <= cnt_x; i++) arr[i] = 0;
  for (i = 0; i < cnt_x; i++) {
    if (xx[i].flag < 0) {
      res += query(i);
      if (!path_fou) {
        if (res > m) return 1;
      }
    }
    insert(i);
  }
  if (!path_fou) {
    if (res < m) return -1;
  }
  if (path_fou) {
    memset(nxt, -1, sizeof(nxt));
    memset(pre, -1, sizeof(pre));
    hs.clear();
    ans = 0;
    for (i = 0; i < cnt_x; i++) {
      now.id = sg[xx[i].id].id;
      now.ip = rt[xx[i].id];
      it = hs.upper_bound(now);
      if (xx[i].flag < 0) {
        if (it != hs.end()) {
          nxt[now.id] = it->id;
          pre[it->id] = now.id;
        }
        if (it != hs.begin()) {
          it--;
          id = it->id;
          while (id >= 0) {
            int ii = now.id, jj = id;
            double xp, yp;
            xp = (lines[jj].b - lines[ii].b) / (lines[ii].a - lines[jj].a);
            yp = lines[ii].a * xp + lines[ii].b;
            ans += sqrt((cx - xp) * (cx - xp) + (cy - yp) * (cy - yp));
            m--;
            id = pre[id];
          }
          nxt[it->id] = now.id;
          pre[now.id] = it->id;
        }
        hs.insert(now);
      } else {
        if (nxt[now.id] >= 0) pre[nxt[now.id]] = pre[now.id];
        if (pre[now.id] >= 0) nxt[pre[now.id]] = nxt[now.id];
        pre[now.id] = -1;
        nxt[now.id] = -1;
        hs.erase(now);
      }
    }
  }
  return 0;
}
int main() {
  int i, j, s, p, q;
  double low, high, mid;
  scanf("%d%lf%lf%d", &n, &cx, &cy, &m);
  cx /= 1000.;
  cy /= 1000.;
  for (i = 0; i < n; i++) {
    scanf("%lf%lf", &lines[i].a, &lines[i].b);
    lines[i].a /= 1000.;
    lines[i].b /= 1000.;
  }
  low = 0;
  high = 2e9 + 2e3;
  for (int it = 0; it <= 100; it++) {
    mid = (low + high) / 2.0;
    int ms = check(mid, 0);
    if (ms <= 0)
      low = mid;
    else if (ms > 0)
      high = mid;
  }
  check(low, 1);
  printf("%.20f\n", ans + low * m);
  return 0;
}
