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;
const double pi = acos(-1);
struct pnt {
  double x, y;
  pnt(double x = 0, double y = 0) : x(x), y(y) {}
  pnt operator+(pnt a) { return pnt(x + a.x, y + a.y); }
  pnt operator-(pnt a) { return pnt(x - a.x, y - a.y); }
  pnt operator/(double a) { return pnt(x / a, y / a); }
  pnt operator*(double a) { return pnt(x * a, y * a); }
  double operator^(pnt a) { return x * a.y - y * a.x; }
  double operator&(pnt a) { return x * a.x + y * a.y; }
  double dist() { return sqrt(x * x + y * y); }
  void input() { scanf("%lf %lf", &x, &y); }
  void print() { printf("%lf %lf\n", x, y); }
} pos[100010], A, B;
double vec[100010], a[100010], w[100010];
int n;
double angle(pnt b, pnt a, pnt c) {
  return acos((b - a & c - a) / (c - a).dist() / (b - a).dist());
}
double D;
int P;
double f(double x, int i, double d, double t, double dl, double v, double al) {
  return dl + v * x - d * sin(w[i] * x) / sin(al + w[i] * x);
}
bool check(double v) {
  int tot = 0;
  for (int i = 0; i < n; i++) {
    if (tot > P) return 0;
    pnt tp = pnt(cos(a[i]), sin(a[i]));
    double t = angle(pos[i] + tp, pos[i], B) / w[i];
    if (v * t < D) {
      tot++;
      continue;
    }
    t = angle(pos[i] + tp, pos[i], A) / w[i];
    if (v * t > D - 1e-7) continue;
    double al = angle(pos[i], A, B);
    if (al > pi / 2 - 1e-7) continue;
    double d = (pos[i] - A).dist();
    double T = (D - v * t) / v, dl = v * t;
    double st = 0, en = T;
    while (st < en - 1e-7) {
      double x = (2 * st + en) / 3, y = (st + 2 * en) / 3;
      if (f(x, i, d, t, dl, v, al) < f(y, i, d, t, dl, v, al))
        en = y;
      else
        st = x;
    }
    if (f(st, i, d, t, dl, v, al) < 1e-7) tot++;
  }
  if (tot > P) return 0;
  return 1;
}
int main() {
  A.input(), B.input();
  D = (A - B).dist();
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    pos[i].input();
    cin >> a[i] >> w[i];
  }
  scanf("%d", &P);
  double l = 0, r = 1e9;
  while (l < r - 1e-7) {
    double mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  printf("%.12lf\n", l);
}