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 double EPS = 1e-9, INF = 1e15, PI = acos(-1.0);
double sq(double x) { return x * x; }
struct P {
  double x, y;
  P() {}
  P(double x, double y) : x(x), y(y) {}
  void eat() { scanf("%lf%lf", &x, &y); }
  P operator+(const P &p) const { return P(x + p.x, y + p.y); }
  P operator-(const P &p) const { return P(x - p.x, y - p.y); }
  P operator*(double k) { return P(x * k, y * k); }
  double operator*(P p) { return x * p.x + y * p.y; }
  double operator^(P p) { return x * p.y - y * p.x; }
  double mag2() { return x * x + y * y; }
  double mag() { return sqrt(mag2()); }
  bool operator<(const P &p) const {
    if ((fabs((x) - (p.x)) < EPS)) return ((y) < (p.y) - EPS);
    return ((x) < (p.x) - EPS);
  }
  bool operator==(const P &p) const {
    return (fabs((x) - (p.x)) < EPS) && (fabs((y) - (p.y)) < EPS);
  }
  P rot() { return P(-y, x); }
  P rot(double the) {
    return P(x * cos(the) - y * sin(the), x * sin(the) + y * cos(the));
  }
  P nor() {
    if ((fabs((mag()) - (0)) < EPS)) return *this;
    return *this * (1. / mag());
  }
  P ref(P n) {
    n = n.nor();
    return n * (n * (*this)) * 2 - *this;
  }
  void out() { printf("(%f,%f)\n", x, y); }
};
bool ssi(P a, P b, P c, P d, P &res) {
  P cd = d - c, ab = b - a;
  if ((fabs((cd ^ ab) - (0)) < EPS)) return 0;
  double t = ((a ^ ab) - (c ^ ab)) / (cd ^ ab);
  double s = ((c ^ cd) - (a ^ cd)) / (ab ^ cd);
  res = c + cd * t;
  return 1;
}
bool Ccw(P a, P b, P c) { return ((0) < ((b - a) ^ (c - a)) - EPS); }
bool Btw(P a, P b, P c) {
  return (fabs(((a - c).mag()) - ((b - a).mag() + (c - b).mag())) < EPS);
}
double Ang(P a, P b) {
  double res = atan2(a ^ b, a * b);
  if (((res) < (0) - EPS)) res += 2 * PI;
  return res;
}
const int N = 20360;
P p[N], dir[N];
P a, b;
double the[N], spd[N], low[N];
int n, k;
int main() {
  a.eat();
  b.eat();
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    p[i].eat();
    scanf("%lf%lf", the + i, spd + i);
    dir[i] = P(cos(the[i]), sin(the[i]));
  }
  scanf("%d", &k);
  double len = (a - b).mag();
  for (int i = 0; i < n; i++) {
    low[i] = 0;
    if (((0) < (spd[i]) - EPS))
      for (int j = 0; j < 2036 + 1; j++) {
        P c = a + (b - a) * (j / 2036.0);
        double ang = Ang(c - p[i], dir[i]);
        ang = min(ang, 2 * PI - ang);
        low[i] = max(low[i], len * (j / 2036.0) / (ang / spd[i]));
      }
  }
  sort(low, low + n);
  double ans = k == n ? 0 : low[n - 1 - k];
  printf("%.20f\n", ans);
  return 0;
}
