0 0 10 10
1
10 0 0 1.57079
0
 -88 -68 -10 -61
5
-64 -55 3.09648 0.28346
-8 -52 2.46781 0.13262
-8 -59 3.02445 0.00119
-40 90 2.37292 0.15686
-29 -34 2.73957 0.18287
0
 0 0 10 10
2
10 0 0 1.57079
10 5 0 0.7854
1
 -100000 -100000 100000 100000
1
100000 0 0 15.70796
0
 -3 -7 -14 2
5
-16 19 2.12587 0.30781
9 -19 3.27418 0.06595
-1 12 0.12414 8.82294
20 10 6.25657 0.77605
-10 17 0.29502 6.31019
5

14.142079
 7.216642
 7.071084
 2828426.5363
 0.0000

#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.00), eps = 1e-6;
struct point {
  double x, y, w, a;
};
point st, en, tank[11111];
int n, k;
void norm(double &theta) {
  while (theta <= -pi) theta += 2 * pi;
  while (theta > pi) theta -= 2 * pi;
}
bool check(double v) {
  int i, j, s, p, q, nk = 0;
  double now_t, theta, T,
      dist =
          sqrt((st.x - en.x) * (st.x - en.x) + (st.y - en.y) * (st.y - en.y));
  double ltheta, rtheta, dtheta;
  T = dist / v;
  for (i = 0; i < n; i++) {
    theta = atan2(en.y - tank[i].y, en.x - tank[i].x);
    rtheta = theta;
    ltheta = atan2(st.y - tank[i].y, st.x - tank[i].x);
    if (ltheta > rtheta)
      dtheta = rtheta + 2 * pi - ltheta;
    else
      dtheta = rtheta - ltheta;
    if (dtheta > pi) swap(ltheta, rtheta);
    if (ltheta > rtheta) {
      if (tank[i].a > ltheta - 1e-9 || tank[i].a < rtheta + 1e-9) {
        nk++;
        continue;
      }
    } else {
      if (tank[i].a > ltheta - 1e-9 && tank[i].a < rtheta + 1e-9) {
        nk++;
        continue;
      }
    }
    if (tank[i].w == 0)
      continue;
    else {
      if (theta < tank[i].a - 1e-9)
        theta += 2 * pi - tank[i].a;
      else
        theta -= tank[i].a;
      now_t = theta / tank[i].w;
      if (now_t < T + eps) nk++;
    }
    if (nk > k) return false;
  }
  return true;
}
int main() {
  int i, j, s, p, q;
  double low, high, mid;
  scanf("%lf%lf%lf%lf", &st.x, &st.y, &en.x, &en.y);
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%lf%lf%lf%lf", &tank[i].x, &tank[i].y, &tank[i].a, &tank[i].w);
    norm(tank[i].a);
  }
  scanf("%d", &k);
  low = 0;
  high = 1e9;
  while (low < high - eps) {
    mid = (low + high) * 0.5;
    if (check(mid))
      high = mid;
    else
      low = mid + eps;
  }
  printf("%.20f\n", (low + high) * 0.5);
  return 0;
}
