0 0 10 10
1
10 0 0 1.57079
0
 -88 -68 -10 -61
5
-64 -55 3.09648 0.28346
-8 -52 2.46781 0.13262
-8 -59 3.02445 0.00119
-40 90 2.37292 0.15686
-29 -34 2.73957 0.18287
0
 0 0 10 10
2
10 0 0 1.57079
10 5 0 0.7854
1
 -100000 -100000 100000 100000
1
100000 0 0 15.70796
0
 -3 -7 -14 2
5
-16 19 2.12587 0.30781
9 -19 3.27418 0.06595
-1 12 0.12414 8.82294
20 10 6.25657 0.77605
-10 17 0.29502 6.31019
5

14.142079
 7.216642
 7.071084
 2828426.5363
 0.0000

import java.io.*;

import java.awt.geom.Point2D;
import java.text.*;
import java.math.*;
import java.util.*;

public class Main implements Runnable {

	/*
-88 -68 -10 -61
5
-64 -55 3.09648 0.28346
-8 -52 2.46781 0.13262
-8 -59 3.02445 0.00119
-40 90 2.37292 0.15686
-29 -34 2.73957 0.18287
0

7.2166
	 */
	final String filename = "";
	final double eps = 1e-8;

	double normAng(double ang) {
		while (ang < 0)
			ang += 2 * Math.PI;
		while (ang >= 2 * Math.PI)
			ang -= 2 * Math.PI;
		return ang;
	}

	double distAng(double x, double y) {
		double ang = x - y;
		ang = normAng(ang);
		if (ang > Math.PI)
			return 2 * Math.PI - ang;
		return ang;
	}

	double dd(double at, double wt, double x0, double y0, double x1, double y1,
			double dist, double v, double t) {
		return at + wt * t
				- Math.atan2(y1 * v / dist * t, x0 + (x1 - x0) * v / dist * t);
	}

	public void solve() throws Exception {
		ArrayList<Double> minv = new ArrayList<Double>();
		minv.add(0.0);

		int x0 = iread(), y0 = iread(), x1 = iread(), y1 = iread();
		double dist = Math.sqrt((x0 - x1) * 1.0 * (x0 - x1) + (y0 - y1) * 1.0
				* (y0 - y1));
		int n = iread();
		for (int t = 0; t < n; t++) {
			int xt = iread(), yt = iread();
			double at = dread(), wt = dread();

			int dx0 = x0 - xt, dy0 = y0 - yt;
			int dx1 = x1 - xt, dy1 = y1 - yt;

			double a = -Math.atan2(dy0, dx0);
			double X0 = dx0 * Math.cos(a) - dy0 * Math.sin(a);
			double Y0 = dx0 * Math.sin(a) + dy0 * Math.cos(a);
			
			double X1 = dx1 * Math.cos(a) - dy1 * Math.sin(a);
			double Y1 = dx1 * Math.sin(a) + dy1 * Math.cos(a);
			at += a;

			if (Y1 < 0) {
				Y1 = -Y1;
				at = -at;
			}
			at = normAng(at) - 2 * Math.PI;
			double maxt = distAng(at, Math.atan2(Y1, X1)) / wt;
			double mint = distAng(at, 0.0) / wt;
			if (maxt < mint)
				mint = maxt;
			double left = dist / maxt, right = dist / mint;
			for (int test = 0; test < 60&&right-left>eps; test++) {
				double v = (left + right) / 2.0;

				double left2 = 0, right2 = dist / v;
				for (int test2 = 0; test2 < 60 && right2-left2>eps; test2++) {
					double t1 = (left2 * 2.0 + right2) / 3.0;
					double t2 = (left2 + right2 * 2.0) / 3.0;

					double f1 = dd(at, wt, X0, Y0, X1, Y1, dist, v, t1);
					double f2 = dd(at, wt, X0, Y0, X1, Y1, dist, v, t2);
					if (f1 > f2)
						right2 = t2;
					else
						left2 = t1;
				}
				double min = dd(at, wt, X0, Y0, X1, Y1, dist, v,
						(left2 + right2) / 2.);
				if (min < 0.0)
					right = v;
				else
					left = v;
			}
			minv.add((left+right)/2.);
		}
		Collections.sort(minv);
		int k = iread();
		DecimalFormat df = new DecimalFormat("0.000000");
		out.write(df.format(minv.get(n - k)) + "\n");
	}

	public void run() {
		try {
			in = new BufferedReader(new InputStreamReader(System.in));
			out = new BufferedWriter(new OutputStreamWriter(System.out));
			// in = new BufferedReader(new FileReader(filename+".in"));
			// out = new BufferedWriter(new FileWriter(filename+".out"));
			solve();
			out.flush();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	public int iread() throws Exception {
		return Integer.parseInt(readword());
	}

	public double dread() throws Exception {
		return Double.parseDouble(readword());
	}

	public long lread() throws Exception {
		return Long.parseLong(readword());
	}

	BufferedReader in;

	BufferedWriter out;

	public String readword() throws IOException {
		StringBuilder b = new StringBuilder();
		int c;
		c = in.read();
		while (c >= 0 && c <= ' ')
			c = in.read();
		if (c < 0)
			return "";
		while (c > ' ') {
			b.append((char) c);
			c = in.read();
		}
		return b.toString();
	}

	public static void main(String[] args) {
		try {
			Locale.setDefault(Locale.US);
		} catch (Exception e) {

		}
		// new Thread(new Main()).start();
		new Thread(null, new Main(), "1", 1 << 25).start();
	}
}