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;
int main() {
  double x0, x1, y0, y1;
  vector<double> time;
  int n, k;
  scanf("%lf%lf%lf%lf%d", &x0, &y0, &x1, &y1, &n);
  for (long long i = 0; i < ((long long)n); i++) {
    double t0, t1, t2, t3;
    scanf("%lf%lf%lf%lf", &t0, &t1, &t2, &t3);
    double ang = acos(abs(x1 - t0) /
                      sqrt((x1 - t0) * (x1 - t0) + (y1 - t1) * (y1 - t1)));
    if (x1 >= t0 && y1 >= t1)
      ang = ang;
    else if (x1 >= t0 && y1 < t1)
      ang = acos(-1) * 2.0 - ang;
    else if (x1 < t0 && y1 >= t1)
      ang = acos(-1) - ang;
    else
      ang = acos(-1) + ang;
    ang = max(t2, ang) - min(t2, ang);
    if (t3 > 0.000001) time.push_back(min(acos(-1) * 2.0 - ang, ang) / t3);
  }
  scanf("%d", &k);
  if (((long long)time.size()) <= k) {
    printf("0.000\n");
    return 0;
  }
  sort(time.begin(), time.end());
  printf("%.4lf\n",
         sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)) / time[k]);
}
