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;
double cal_ang(double x, double y) {
  double res = acos(abs(x / hypot(x, y)));
  if (x <= 0 && y >= 0) return acos(-1) - res;
  if (x <= 0 && y < 0) return acos(-1) + res;
  if (x > 0 && y < 0) return acos(-1) * 2.0 - res;
  return res;
}
int main() {
  double x0, x1, y0, y1, t0, t1, t2, t3;
  int n, k;
  vector<double> time;
  scanf("%lf%lf%lf%lf%d", &x0, &y0, &x1, &y1, &n);
  for (long long i = 0; i < ((long long)n); i++) {
    scanf("%lf%lf%lf%lf", &t0, &t1, &t2, &t3);
    if (t3 < 1e-5) continue;
    x0 -= t0;
    x1 -= t0;
    y0 -= t1;
    y1 -= t1;
    double tmp = 0;
    for (long long j = 0; j < ((long long)100 + 1); j++) {
      double x = x0 + (x1 - x0) * j / (double)100;
      double y = y0 + (y1 - y0) * j / (double)100;
      double ang = cal_ang(x, y);
      ang -= t2;
      if (ang < 0) ang += 2.0 * acos(-1);
      while (ang > acos(-1) * 2.0) ang -= acos(-1) * 2.0;
      ang = min(acos(-1) * 2.0 - ang, ang);
      tmp = max(tmp, hypot(x0 - x, y0 - y) / (ang / t3));
    }
    time.push_back(tmp);
    x0 += t0;
    x1 += t0;
    y0 += t1;
    y1 += t1;
  }
  scanf("%d", &k);
  if (((long long)time.size()) <= k) {
    printf("0.0000\n");
    return 0;
  }
  sort(time.begin(), time.end());
  reverse(time.begin(), time.end());
  printf("%.4lf\n", time[k]);
  return 0;
}
