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 <cstdio>
#include <cmath>
#include <algorithm>
using namespace std;

const double PI=3.1415926535897932384626433832795029L;
const int N=10000;

struct Point
{
    int x,y;
    void Read()
    {
        scanf("%d%d",&x,&y);
    }
    Point(int x=0,int y=0)
    {
        this->x=x;
        this->y=y;
    }
};

Point a,b;
int n;

struct Vect
{
    int x,y;
    Vect(const Point &start, const Point &finish)
    {
        x=finish.x-start.x;
        y=finish.y-start.y;
    }
    double Polar() const
    {
        double res=atan2(y,x);
        if(res<0)
            res+=2*PI;
        return res;
    }
};

double time[N];

double DistPoints(const Point &a, const Point &b)
{
    double x=a.x-b.x;
    double y=a.y-b.y;
    return sqrt(x*x+y*y);
}

int main()
{
    //freopen("input.txt","r",stdin);
    a.Read();
    b.Read();
    scanf("%d",&n);
    int tn=0;
    for(int i=0;i<n;i++)
    {
        Point t;
        double angle,w;
        t.Read();
        scanf("%lf%lf",&angle,&w);
        //if(w==0)
        //    continue;
        angle=fabs(angle-Vect(t,b).Polar());
        if(angle>PI)
            angle=2*PI-angle;
        time[tn++]=angle/w;
    }
    sort(time,time+tn);
    int k;
    scanf("%d",&k);
    if(k>=tn)
    {
        printf("0.0");
        return 0;
    }
    printf("%.10lf",DistPoints(a,b)/time[k]);
    return 0;
}
