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;
pair<double, double> operator-(pair<double, double> a, pair<double, double> b) {
  return pair<double, double>(a.first - b.first, a.second - b.second);
}
pair<double, double> st, dir;
double _w, _s, _len;
inline double f(double t) {
  double first = st.first + dir.first * t, second = st.second + dir.second * t;
  double r = atan2(second, first) - _s;
  while (r < 0) {
    r += 2 * M_PI;
  }
  while (r > 2 * M_PI) {
    r -= 2 * M_PI;
  }
  return _len * t * _w / min(r, 2 * M_PI - r);
}
double get(pair<double, double> a, pair<double, double> b, double s, double w) {
  st = a;
  dir = b - a;
  _s = s;
  _w = w;
  _len = hypot(dir.first, dir.second);
  double res = 0;
  for (int i = 0; i <= 100; i++) {
    double t = f(i / 100.);
    if (t > res) {
      res = t;
    }
  }
  return res;
}
void read(pair<double, double> &p) {
  double first, second;
  scanf("%lf%lf", &first, &second);
  p.first = first;
  p.second = second;
}
int main(void) {
  pair<double, double> a, b;
  read(a);
  read(b);
  int n;
  scanf("%d", &n);
  vector<double> v(1, 0);
  for (int i = 0; i < n; i++) {
    pair<double, double> p;
    read(p);
    double s, w;
    scanf("%lf%lf", &s, &w);
    v.push_back(get(a - p, b - p, s, w));
  }
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  int k;
  scanf("%d", &k);
  printf("%.20lf\n", v[k]);
  return 0;
}
