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;
template <class T>
T abs(T x) {
  return x > 0 ? x : -x;
}
const double pi = 2 * asin(1.0);
int n;
int m;
double x[10000], y[10000], a[10000], w[10000];
double ax, ay, bx, by;
double dist(double x1, double y8687969, double x2, double y2) {
  return sqrt(
      abs(((x2 - x1) * (x2 - x1)) + ((y2 - y8687969) * (y2 - y8687969))));
}
double get(int i, double x, double y) {
  double b = atan2(y - ::y[i], x - ::x[i]);
  double ang = abs(a[i] - b);
  if (ang > 2 * pi) ang -= 2 * pi;
  return min(ang, 2 * pi - ang) / w[i];
}
double cross(double x1, double y8687969, double x2, double y2, double x3,
             double y3, double x4, double y4) {
  double a = x2 - x1;
  double b = x3 - x4;
  double c = x3 - x1;
  double d = y2 - y8687969;
  double e = y3 - y4;
  double f = y3 - y8687969;
  return (c * e - b * f) / (a * e - b * d);
}
int calc(double v) {
  int tmp = 0;
  double d = dist(ax, ay, bx, by);
  double dx = (bx - ax);
  double dy = (by - ay);
  double t = d / v;
  for (int i = 0; i < n; i++) {
    if (w[i] < 1e-6) continue;
    if (get(i, bx, by) < t)
      tmp++;
    else {
      double l = 0,
             r = max(0.0, min(1.0, cross(ax, ay, bx, by, x[i], y[i],
                                         x[i] + (by - ay), y[i] + (ax - bx))));
      for (int it = 0; it < 40; it++) {
        double s1 = (2 * l + r) / 3;
        double s2 = (l + 2 * r) / 3;
        double d1 = get(i, ax + dx * s1, ay + dy * s1) - t * s1;
        double d2 = get(i, ax + dx * s2, ay + dy * s2) - t * s2;
        if (d1 < d2)
          r = s2;
        else
          l = s1;
      }
      double ss = (l + r) / 2;
      double dd = get(i, ax + dx * ss, ay + dy * ss) - t * ss;
      if (dd < 0) tmp++;
    }
  }
  return tmp;
}
int main() {
  cin >> ax >> ay >> bx >> by >> n;
  for (int i = 0; i < n; i++) cin >> x[i] >> y[i] >> a[i] >> w[i];
  cin >> m;
  double l = 0, r = 1e10;
  for (int it = 0; it < 60; it++) {
    double s = (l + r) / 2;
    if (calc(s) <= m)
      r = s;
    else
      l = s;
  }
  printf("%.10f\n", r);
  return 0;
}