Problem: Vasya plays the Plane of Tanks. The tanks in this game keep trying to finish each other off. But your "Pedalny" is not like that... He just needs to drive in a straight line from point A to point B on the plane. Unfortunately, on the same plane are n enemy tanks. We shall regard all the tanks as points. At the initial moment of time Pedalny is at the point A. Enemy tanks would be happy to destroy it immediately, but initially their turrets are tuned in other directions. Specifically, for each tank we know the initial rotation of the turret ai (the angle in radians relative to the OX axis in the counterclockwise direction) and the maximum speed of rotation of the turret wi (radians per second). If at any point of time a tank turret will be aimed precisely at the tank Pedalny, then the enemy fires and it never misses. Pedalny can endure no more than k shots. Gun reloading takes very much time, so we can assume that every enemy will produce no more than one shot. Your task is to determine what minimum speed of v Pedalny must have to get to the point B. It is believed that Pedalny is able to instantly develop the speed of v, and the first k shots at him do not reduce the speed and do not change the coordinates of the tank.

Input

The first line contains 4 numbers – the coordinates of points A and B (in meters), the points do not coincide. On the second line number n is given (1 ≤ n ≤ 104). It is the number of enemy tanks. Each of the following n lines contain the coordinates of a corresponding tank xi, yi and its parameters ai and wi (0 ≤ ai ≤ 2π, 0 ≤ wi ≤ 100). Numbers ai and wi contain at most 5 digits after the decimal point. All coordinates are integers and their absolute values do not exceed 105. Enemy tanks can rotate a turret in the clockwise as well as in the counterclockwise direction at the angular speed of not more than wi. It is guaranteed that each of the enemy tanks will need at least 0.1 seconds to aim at any point of the segment AB and each of the enemy tanks is posistioned no closer than 0.1 meters to line AB. On the last line is given the number k (0 ≤ k ≤ n).

Output

Print a single number with absolute or relative error no more than 10 - 4 — the minimum required speed of Pedalny in meters per second.

Examples

Input

0 0 10 0
1
5 -5 4.71238 1
0


Output

4.2441


Input

0 0 10 0
1
5 -5 4.71238 1
1


Output

0.0000

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
struct point {
  double x, y;
};
double dist(point &P, point &Q) {
  double dx = P.x - Q.x, dy = P.y - Q.y;
  return sqrt(dx * dx + dy * dy);
}
double inprod(point &O, point &P, point &Q) {
  return (P.x - O.x) * (Q.x - O.x) + (P.y - O.y) * (Q.y - O.y);
}
point foot(point &P, point &A, point &B) {
  double t = inprod(A, B, P) / inprod(A, B, B);
  point ans = {A.x + (B.x - A.x) * t, A.y + (B.y - A.y) * t};
  return ans;
}
point rotate(point &P, double theta) {
  double x = P.x * cos(theta) - P.y * sin(theta);
  double y = P.x * sin(theta) + P.y * cos(theta);
  point ans = {x, y};
  return ans;
}
double arg(point &P) {
  double ans = atan2(P.y, P.x);
  if (ans < 0.0) ans += 2.0 * acos(-1.0);
  return ans;
}
bool check(point &A, point &C, double v, double w) {
  double t = dist(A, C) / v;
  double theta = arg(C);
  theta = min(theta, 2.0 * acos(-1.0) - theta);
  return (w * t > theta);
}
double func(point A, point B, point P, double a, double w) {
  int iter;
  if (w < 1.0E-6) return 0.0;
  A.x -= P.x;
  A.y -= P.y;
  B.x -= P.x;
  B.y -= P.y;
  A = rotate(A, -a);
  B = rotate(B, -a);
  if (arg(A) > arg(B)) {
    A.y = -A.y;
    B.y = -B.y;
  }
  point O = {0.0, 0.0};
  double low = 0.0, high = 1.0E+7, mid;
  for ((iter) = 0; (iter) < (int)(100); (iter)++) {
    mid = (high + low) / 2.0;
    if (check(A, B, mid, w)) {
      low = mid;
      continue;
    }
    point H = foot(O, A, B);
    double h = dist(O, H);
    if (h * w < mid) {
      double t = sqrt(mid / (h * w) - 1.0);
      point C = {H.x + H.y * t, H.y - H.x * t};
      if (inprod(C, A, B) < 0.0 && check(A, C, mid, w)) {
        low = mid;
        continue;
      }
      point D = {H.x - H.y * t, H.y + H.x * t};
      if (inprod(D, A, B) < 0.0 && check(A, D, mid, w)) {
        low = mid;
        continue;
      }
    }
    high = mid;
  }
  return mid;
}
int main(void) {
  int N, K, i;
  point A, B, P;
  double a, w;
  cin >> A.x >> A.y >> B.x >> B.y;
  cin >> N;
  vector<double> v;
  for ((i) = 0; (i) < (int)(N); (i)++) {
    cin >> P.x >> P.y >> a >> w;
    double tmp = func(A, B, P, a, w);
    v.push_back(tmp);
  }
  cin >> K;
  v.push_back(0.0);
  sort(v.begin(), v.end());
  double ans = v[N - K];
  printf("%.6f\n", ans);
  return 0;
}