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 int Maxn = 10000 + 10;
const int INF = 0x7f7f7f7f;
const double eps = 1e-10;
const double pi = acos(-1.0);
inline int compare(double a, double b) {
  return (a > b + eps) ? 1 : ((a + eps < b) ? -1 : 0);
}
struct Point {
  double x, y;
  Point() {}
  Point(double x1, double y1) : x(x1), y(y1) {}
  double dist(Point &p) {
    return sqrt((x - p.x) * (x - p.x) + (y - p.y) * (y - p.y));
  }
  Point operator-(const Point &p) const { return Point(x - p.x, y - p.y); }
  double norm() { return sqrt(x * x + y * y); }
};
Point p[Maxn];
double t[Maxn], rad[Maxn], v[Maxn];
int main() {
  Point a, b;
  int n, k;
  ios::sync_with_stdio(0);
  cin >> a.x >> a.y >> b.x >> b.y;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> p[i].x >> p[i].y >> rad[i] >> v[i];
    Point tt(cos(rad[i]), sin(rad[i]));
    Point ss = b - p[i];
    t[i] = acos((tt.x * ss.x + tt.y * ss.y) / ss.norm());
    t[i] = max(0.1, abs(t[i]) / v[i]);
  }
  sort(t, t + n);
  cin >> k;
  if (k >= n)
    printf("%.8f\n", 0.0);
  else
    printf("%.8f\n", a.dist(b) / t[k]);
  return 0;
}
