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

#include<stdio.h>
#include<algorithm>
#include<math.h>
#define max 10000
#define pi 3.1415926535897932384626433832795
struct _POINT{
	int x,y;
};
struct _TANK{
	_POINT l;
	double a,w;
};
_POINT A,B;
_TANK t[max+5];
double lv[max+5];
int ccw(_POINT a,_POINT b,_POINT c){
	__int64 ret=(__int64)a.x*b.y+(__int64)b.x*c.y+(__int64)c.x*a.y;
	ret-=((__int64)b.x*a.y+(__int64)c.x*b.y+(__int64)a.x*c.y);
	if(ret<0) return -1;
	if(ret>0) return 1;
	return 0;
}
double rabs(double a){
	if(a<0) return -a;
	return a;
}
double min(double a,double b){
	if(a<b) return a;
	return b;
}
int mid(double a,double b,double c){
	if(a<=b && b<=c) return 1;
	if(a>=b && b>=c) return 1;
	return 0;
}
int main(){
	int n,k;
	scanf("%d%d%d%d",&A.x,&A.y,&B.x,&B.y);
	double dist=sqrt(((double)A.x-B.x)*((double)A.x-B.x)+((double)A.y-B.y)*((double)A.y-B.y));
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d%d%lf%lf",&t[i].l.x,&t[i].l.y,&t[i].a,&t[i].w);
		double aa=atan2((double)(A.y-t[i].l.y),(double)(A.x-t[i].l.x));
		double ab=atan2((double)(B.y-t[i].l.y),(double)(B.x-t[i].l.x));
		double ma=atan2((double)(A.x-B.x),(double)(B.y-A.y));
		if(ccw(B,t[i].l,A)<0){
			if(aa<ab) aa+=2*pi;
			if(mid(aa,t[i].a,ab) || mid(aa,t[i].a+2*pi,ab)) lv[i]=-1;
			else{
				double DT1=ab-t[i].a;
				if(DT1<0) DT1+=2*pi;
				DT1/=t[i].w;
				if(!mid(aa,ma,ab)) ma+=pi;
				double DT2=t[i].a-ma;
				if(DT2<0) DT2+=2*pi;
				DT2/=t[i].w;
				lv[i]=dist/min(DT1,DT2)+0.00005;
			}
		}
		else if(ccw(B,t[i].l,A)>0){
			if(ab<aa) ab+=2*pi;
			if(mid(aa,t[i].a,ab) || mid(aa,t[i].a+2*pi,ab)) lv[i]=-1;
			else{
				double DT1=t[i].a-ab;
				if(DT1<0) DT1+=2*pi;
				DT1/=t[i].w;
				if(!mid(aa,ma,ab)) ma+=pi;
				double DT2=ma-t[i].a;
				if(DT2<0) DT2+=2*pi;
				DT2/=t[i].w;
				lv[i]=dist/min(DT1,DT2)+0.00005;
			}
		}
		else{
			double DT=min(rabs(t[i].a-aa),2*pi-rabs(t[i].a-aa))/t[i].w;
			lv[i]=dist/DT+0.00005;
		}
	}
	scanf("%d",&k);
	std::sort(lv,lv+n);
	lv[n]=0;
	printf("%lf\n",lv[k]);
	return 0;
}
