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>
int main(int argc, char** argv) {
  double x1, y1, x2, y2, x3, y3, x5, y5, x1tab[10000], y1tab[10000],
      x5tab[10000], y5tab[10000], angle[10000], w[10000];
  int k, n;
  double length;
  double miny[10001];
  scanf("%lf%lf%lf%lf", &x2, &y2, &x3, &y3);
  length =
      sqrt(x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 + y3 * y3);
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%lf%lf%lf%lf", &x5tab[i], &y5tab[i], &angle[i], &w[i]);
    x1tab[i] = cos(angle[i]);
    y1tab[i] = sin(angle[i]);
  }
  scanf("%d", &k);
  for (int i = 0; i < n; i++) {
    x1 = x1tab[i];
    y1 = y1tab[i];
    x5 = x5tab[i];
    y5 = y5tab[i];
    double a, b, c, d, e;
    a = x1 * (x3 - x2) /
            sqrt(x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 +
                 y3 * y3) +
        y1 * (y3 - y2) /
            sqrt(x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 +
                 y3 * y3);
    b = x1 * (x2 - x5) + y1 * (y2 - y5);
    c = (x3 - x2) * (x3 - x2) /
            (x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 +
             y3 * y3) +
        (y3 - y2) * (y3 - y2) /
            (x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 + y3 * y3);
    d = (2 * (x2 - x5)) * (x3 - x2) /
            sqrt(x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 +
                 y3 * y3) +
        (2 * (y2 - y5)) * (y3 - y2) /
            sqrt(x2 * x2 - 2 * x2 * x3 + x3 * x3 + y2 * y2 - 2 * y2 * y3 +
                 y3 * y3);
    e = (x2 - x5) * (x2 - x5) + (y2 - y5) * (y2 - y5);
    double min1 =
        acos((a * length + b) / sqrt(c * length * length + d * length + e)) /
        w[i] / length;
    for (int j = 1; j < 100; j++) {
      double x = length * j / 100;
      double min2 = acos((a * x + b) / sqrt(c * x * x + d * x + e)) / w[i] / x;
      if (min2 < min1) min1 = min2;
    }
    miny[i] = 1 / min1;
  }
  if (k >= n) {
    printf("%.4f", 0);
  } else {
    std::sort(miny, miny + n);
    printf("%.4f", miny[n - k - 1]);
  }
}