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 const pi = 3.1415926535897932384626433832795;
int const inf = (int)1e9;
long long const inf64 = (long long)2e18;
const string name = "f";
const int NMAX = 10010;
int n, k;
double x1, qqqqqqq, x2, y2;
double x[NMAX], y[NMAX], alp[NMAX], w[NMAX];
double dist(double x1, double qqqqqqq, double x2, double y2) {
  return sqrt(((long long)x1 - x2) * (x1 - x2) +
              ((long long)qqqqqqq - y2) * (qqqqqqq - y2));
}
double calc(int num, double ang) {
  double delta = fabs(ang - alp[num]);
  delta = min(delta, 2 * pi - delta);
  if (w[num] < 1e-7)
    return 1e10;
  else
    return delta / w[num];
}
bool good(double v, int num) {
  double t = dist(x1, qqqqqqq, x2, y2) / v;
  double w = calc(num, atan2(y2 - y[num], x2 - x[num]));
  if (w < t)
    return false;
  else
    return true;
}
bool may(double v) {
  int cnt = 0;
  for (int i = 0; i < (int)n; i++)
    if (!good(v, i)) cnt++;
  return cnt <= k;
}
int main() {
  cin >> x1 >> qqqqqqq >> x2 >> y2;
  cin >> n;
  for (int i = 0; i < (int)n; i++)
    scanf("%lf%lf%lf%lf", &x[i], &y[i], &alp[i], &w[i]);
  cin >> k;
  if (k >= n) {
    printf("%.6lf\n", 0.0);
    return 0;
  }
  double l = 0, r = 1e9;
  while (fabs(r - l) > 1e-6) {
    double m = (l + r) / 2;
    if (may(m))
      r = m;
    else
      l = m;
  }
  printf("%.6lf\n", (l + r) / 2);
  return 0;
}
