How horrible! The empire of galactic chickens tries to conquer a beautiful city "Z", they have built a huge incubator that produces millions of chicken soldiers a day, and fenced it around. The huge incubator looks like a polygon on the plane *Oxy* with *n* vertices. Naturally, DravDe can't keep still, he wants to destroy the chicken empire. For sure, he will start with the incubator.

DravDe is strictly outside the incubator's territory in point *A*(*x*<sub class="lower-index">*a*</sub>, *y*<sub class="lower-index">*a*</sub>), and wants to get inside and kill all the chickens working there. But it takes a lot of doing! The problem is that recently DravDe went roller skating and has broken both his legs. He will get to the incubator's territory in his jet airplane LEVAP-41.

LEVAP-41 flies at speed *V*(*x*<sub class="lower-index">*v*</sub>, *y*<sub class="lower-index">*v*</sub>, *z*<sub class="lower-index">*v*</sub>). DravDe can get on the plane in point *A*, fly for some time, and then air drop himself. DravDe is very heavy, that's why he falls vertically at speed *F*<sub class="lower-index">*down*</sub>, but in each point of his free fall DravDe can open his parachute, and from that moment he starts to fall at the wind speed *U*(*x*<sub class="lower-index">*u*</sub>, *y*<sub class="lower-index">*u*</sub>, *z*<sub class="lower-index">*u*</sub>) until he lands. Unfortunately, DravDe isn't good at mathematics. Would you help poor world's saviour find such an air dropping plan, that allows him to land on the incubator's territory? If the answer is not unique, DravDe wants to find the plan with the minimum time of his flight on the plane. If the answers are still multiple, he wants to find the one with the minimum time of his free fall before opening his parachute
The first line contains the number *n* (3 ≤ *n* ≤ 10<sup class="upper-index">4</sup>) — the amount of vertices of the fence. Then there follow *n* lines containing the coordinates of these vertices (two integer numbers *x*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub>) in clockwise or counter-clockwise order. It's guaranteed, that the fence does not contain self-intersections.

The following four lines contain coordinates of point *A*(*x*<sub class="lower-index">*a*</sub>, *y*<sub class="lower-index">*a*</sub>), speeds *V*(*x*<sub class="lower-index">*v*</sub>, *y*<sub class="lower-index">*v*</sub>, *z*<sub class="lower-index">*v*</sub>), *F*<sub class="lower-index">*down*</sub> and speed *U*(*x*<sub class="lower-index">*u*</sub>, *y*<sub class="lower-index">*u*</sub>, *z*<sub class="lower-index">*u*</sub>). All the input numbers are integer. All the coordinates don't exceed 10<sup class="upper-index">4</sup> in absolute value. It's guaranteed, that *z*<sub class="lower-index">*v*</sub> &gt; 0 and *F*<sub class="lower-index">*down*</sub>, *z*<sub class="lower-index">*u*</sub> &lt; 0, and point *A* is strictly outside the incubator's territory.
from fractions import Fraction as Frac
INFEXT = "infinite intersections"
class Point:
    def __init__(self,x,y):
        self.x=Frac(x)
        self.y=Frac(y)
    def __add__(self,other):
        return Point(self.x+other.x,self.y+other.y)
    def __sub__(self,other):
        return Point(self.x-other.x,self.y-other.y)
    def __mul__(self,other):
        return Point(self.x*other,self.y*other)
    def __eq__(self,other):
        return self.x==other.x and self.y==other.y
    def __lt__(self,other):
        return self.x<other.x or (self.x==other.x and self.y<other.y)
    def __truediv__(self,other):
        if other.x!=0:
            return self.x/other.x
        return self.y/other.y
    def __str__(self):
        return str((self.x,self.y))
    def __bool__(self):
        return True
    __repr__=__str__
    def insc(self,other):
        #other != 0
        return other*(self/other)==self

def inter(P1,P2,P3,P4):
    # REFER to wikipedia
    t1=(P1.x-P3.x)*(P3.y-P4.y)-(P1.y-P3.y)*(P3.x-P4.x)
    t2=(P1.x-P2.x)*(P3.y-P4.y)-(P1.y-P2.y)*(P3.x-P4.x)
    if t2==0:
        if t1:
            return None
        return INFEXT
    return P1+(P2-P1)*(t1/t2)
def between(P1,P2,P3):
    # if P1--P2--P3
    if P2>P1 and P2>P3:return False
    if P2<P1 and P2<P3:return False
    return True

def intersects(V1,V2,P):
    # if OP is between the vectors V1, V2
    itp = inter(V1,V2,Point(0,0),P)
    if (bool(itp)==False):return False
    #print(itp)
    if between(V1,itp,V2):
        proj = inter(P,P+V2-V1,Point(0,0),V1)
        #print(proj)
        return proj/V1,(P-inter(P,P+V2-V1,Point(0,0),V2))/(V1-V2)
    return False
P1=Point(3,5)
P2=Point(6,1)
P3=Point(1,1)



n=int(input())
L=[]
for i in range(n):
    a,b=input().split()
    a=int(a)
    b=int(b)
    L.append(Point(a,b))

a,b=input().split()
a=int(a)
b=int(b)
ptA=Point(a,b)
M=[p-ptA for p in L]
M.append(M[0])
a,b,c=input().split()
a=Frac(a)
b=Frac(b)
c=Frac(c)
uspeed=c
vnf=Point(a/c,b/c)
fdt=-int(input())
a,b,c=input().split()
a=Frac(a)
b=Frac(b)
c=-Frac(c)
dspeed=c
vgf=Point(a/c,b/c)+vnf
#print(vnf,vgf)
mpN=Frac(100000000,1)
mnN=-mpN
N=[]
#print(M)
if vnf.x*vgf.y==vnf.y*vgf.x:
    #print("PARA")
    if vnf==Point(0,0) and vgf==Point(0,0):
        print(-1,-1)
    else:
        # take vnf as a reference direction
        vgc=vgf/vnf
        for i in range(n):
            # we need to find the closest vertex/v-v-s inter
            if vnf.insc(M[i]):
                quot=M[i]/vnf
                if quot>0:
                    mpN=min(quot,mpN)
                else:
                    mnN=max(quot,mnN)
            MMI = inter(M[i],M[i+1],Point(0,0),vnf)
            if bool(MMI) and type(MMI)!=type(INFEXT) and \
               between(M[i],MMI,M[i+1]):
                quot=MMI/vnf
                if quot>0:
                    mpN=min(quot,mpN)
                else:
                    mnN=max(quot,mnN)
        # process new,olds
        if vgc>=0:
            vm=max(1,vgc)
            htk = mpN/vm
            ttk = htk/uspeed
            if vm==vgc:print(float(ttk),0)
            else:print(float(ttk),float(htk/fdt))
        else:
            htk1=mpN
            htk2=mnN/vgc
            if htk2<=htk1:
                # htk2 better
                print(float(htk2/uspeed),0)
            else:
                print(float(htk1/uspeed),float(htk1/fdt))
    
        
        
else:
    for i in range(n):
        # we need to find the closest vertex/v-v-s inter
        if (y:=intersects(vnf,vgf,M[i])):
            N.append((M[i],y[0],y[1]))
            #print(0,N[-1])
        MMI = inter(M[i],M[i+1],Point(0,0),vnf)
        if bool(MMI) and between(M[i],MMI,M[i+1]) and (y:=intersects(vnf,vgf,MMI)):
            N.append((MMI,y[0],y[1]))
            #print(1,N[-1])
        MMI = inter(M[i],M[i+1],Point(0,0),vgf)
        if bool(MMI) and between(M[i],MMI,M[i+1]) and (y:=intersects(vnf,vgf,MMI)):
            N.append((MMI,y[0],y[1]))
            #print(2,N[-1])
    N.sort(key=lambda x:(x[1],x[2]))
    if len(N):
        #print("ans=",N[0])
        t=N[0][1]/uspeed
        print(float(t),float((N[0][2])/fdt))
    else:print(-1,-1)
    
    
        
