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>
inline void read(T& x) {
  bool fu = 0;
  char c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  if (c == '-') fu = 1, c = getchar();
  for (x = 0; c > 32; c = getchar()) x = x * 10 + c - '0';
  if (fu) x = -x;
};
template <class T>
inline void read(T& x, T& y) {
  read(x);
  read(y);
}
template <class T>
inline void read(T& x, T& y, T& z) {
  read(x);
  read(y);
  read(z);
}
inline char getc() {
  char c;
  for (c = getchar(); c <= 32; c = getchar())
    ;
  return c;
}
const double pi = 2 * acos(0);
struct node {
  double x, y;
};
void read(node& a) { read(a.x, a.y); }
int sgn(double x) {
  if (x == 0) return 0;
  return x > 0 ? 1 : -1;
}
node operator+(node a, node b) { return (node){a.x + b.x, a.y + b.y}; }
node operator-(node a, node b) { return (node){a.x - b.x, a.y - b.y}; }
node operator*(node a, double x) { return (node){a.x * x, a.y * x}; }
node operator/(node a, double x) { return (node){a.x / x, a.y / x}; }
node mul(node a, node b) { return (node){a.x * b.x, a.y * b.y}; }
double operator*(node a, node b) { return a.x * b.y - a.y * b.x; }
double xj(node a, node b, node c) { return (b - a) * (c - a); }
double len(node a) { return sqrt(a.x * a.x + a.y * a.y); }
bool on(node a, node b, node c) {
  if (a.x >= min(b.x, c.x) && a.x <= max(b.x, c.x) && a.y >= min(b.y, c.y) &&
      a.y <= max(b.y, c.y) && xj(b, a, c) == 0)
    return 1;
  return 0;
}
bool pdj(node a, node b, node c, node d) {
  return sgn(xj(a, c, b)) * sgn(xj(a, b, d)) > 0 &&
         sgn(xj(b, c, a)) * sgn(xj(b, a, d)) > 0 &&
         sgn(xj(c, b, d)) * sgn(xj(c, d, a)) > 0 &&
         sgn(xj(d, a, c)) * sgn(xj(d, c, b)) > 0;
}
int n, i, j, k, p, K;
double L, R;
node A, B, C, D;
double alp, w, a[11111];
const int W = 2000;
int main() {
  read(A);
  read(B);
  read(n);
  for (i = 1; i <= n; i++) {
    read(C);
    scanf("%lf%lf", &alp, &w);
    double vmax = 0, z;
    for (int cnt = (0); cnt <= (W); cnt++) {
      D = (node){(A.x + (B.x - A.x) / W * cnt), (A.y + (B.y - A.y) / W * cnt)};
      z = alp - atan2(D.y - C.y, D.x - C.x);
      while (z < 0) z += 2 * pi;
      while (z >= 2 * pi) z -= 2 * pi;
      if (z > pi) z = 2 * pi - z;
      vmax = max(vmax, len(D - A) / (z / w + 1e-12));
    }
    a[i] = vmax;
  }
  read(K);
  sort(a + 1, a + 1 + n);
  cout << fixed << setprecision(10) << a[n - K] << endl;
  return 0;
}