#include <bits/stdc++.h>
using namespace std;
long double prodesc(complex<long double> p1, complex<long double> p2) {
  return real(conj(p1) * p2);
}
long double prodvec(complex<long double> p1, complex<long double> p2) {
  return imag(conj(p1) * p2);
}
long double error = 0.000000000001;
void llegeix(complex<long double> &p) {
  int x, y;
  cin >> x >> y;
  p = complex<long double>(x, y);
}
int n;
vector<complex<long double> > poligon;
complex<long double> a;
complex<long double> v;
long double vz;
long double fdown;
complex<long double> u;
long double uz;
pair<long double, long double> tminim;
bool hihatminim;
complex<long double> vfora;
void nout(pair<long double, long double> t) {
  if ((not hihatminim) or t < tminim) {
    tminim = t;
    hihatminim = true;
  }
}
complex<long double> computavfora() {
  long double time = vz / uz;
  return v + time * u;
}
complex<long double> interseccio(complex<long double> p1,
                                 complex<long double> u1,
                                 complex<long double> p2,
                                 complex<long double> u2) {
  return p1 + (prodvec(p2 - p1, u2) / prodvec(u1, u2)) * u1;
}
void interseccio(complex<long double> p1, complex<long double> u1,
                 complex<long double> p2, complex<long double> u2,
                 complex<long double> &p, bool &hihainterseccio) {
  p = p1 + (prodvec(p2 - p1, u2) / prodvec(u1, u2)) * u1;
  if (prodesc(u1, p - p1) > -error and prodesc(u2, p - p2) > -error and
      prodesc(-u2, p - (p2 + u2)) > -error)
    hihainterseccio = true;
  else
    hihainterseccio = false;
}
void computapuntnoparalel(complex<long double> p) {
  if ((prodvec(v, vfora) > 0 and prodvec(v, p - a) > -error and
       prodvec(p - a, vfora) > -error) or
      (prodvec(v, vfora) < 0 and prodvec(v, p - a) < error and
       prodvec(p - a, vfora) < error)) {
    complex<long double> inter = interseccio(a, v, p, u);
    long double vtime = abs(inter - a) / abs(v);
    long double vh = vtime * vz;
    long double utime = abs(inter - p) / abs(u);
    long double uh = utime * uz;
    long double ftime = (vh - uh) / fdown;
    nout(pair<long double, long double>(vtime, ftime));
  }
}
void computaminimnoparalel() {
  hihatminim = false;
  vfora = computavfora();
  for (int i = 0; i < n; i++) {
    complex<long double> p = poligon[i];
    computapuntnoparalel(p);
    complex<long double> pnext = poligon[(i + 1) % n];
    bool hihainterseccio;
    complex<long double> inter;
    if (abs(prodvec(v, pnext - p)) > error) {
      interseccio(a, v, p, pnext - p, inter, hihainterseccio);
      if (hihainterseccio) computapuntnoparalel(inter);
    }
    if (abs(prodvec(vfora, pnext - p)) > error) {
      interseccio(a, vfora, p, pnext - p, inter, hihainterseccio);
      if (hihainterseccio) computapuntnoparalel(inter);
    }
  }
}
void computapuntcaiguda(complex<long double> p) {
  if (abs(v) < error) return;
  if (abs(prodvec(v, p - a)) > error) return;
  if (prodesc(v, p - a) < -error) return;
  long double vtime = abs(p - a) / abs(v);
  long double vh = vtime * vz;
  long double ftime = vh / fdown;
  nout(pair<long double, long double>(vtime, ftime));
}
void computapuntnocaiguda(complex<long double> p) {
  complex<long double> dir = v;
  if (abs(v) < error) dir = u;
  dir = dir / abs(dir);
  if (abs(prodvec(dir, p - a)) > error) return;
  complex<long double> vv(prodesc(v, dir), vz);
  complex<long double> uu(prodesc(u, dir), -uz);
  complex<long double> pp(prodesc(p - a, dir), 0);
  complex<long double> aa(0, 0);
  if (abs(prodvec(vv, uu)) < error) return;
  complex<long double> inter = interseccio(aa, vv, pp, uu);
  long double vtime = abs(inter - aa) / abs(vv);
  if (prodesc(vv, inter - aa) < error) return;
  if (prodesc(uu, pp - inter) < error) return;
  nout(pair<long double, long double>(vtime, 0));
}
void computaminimparalel() {
  hihatminim = false;
  for (int i = 0; i < n; i++) {
    complex<long double> p = poligon[i];
    computapuntcaiguda(p);
    computapuntnocaiguda(p);
    complex<long double> pnext = poligon[(i + 1) % n];
    complex<long double> dir = v;
    if (abs(v) < error) dir = u;
    bool hihainterseccio;
    complex<long double> inter;
    if (abs(prodvec(dir, pnext - p)) > error) {
      interseccio(a, dir, p, pnext - p, inter, hihainterseccio);
      if (hihainterseccio) {
        computapuntcaiguda(inter);
        computapuntnocaiguda(inter);
      }
      interseccio(a, -dir, p, pnext - p, inter, hihainterseccio);
      if (hihainterseccio) {
        computapuntcaiguda(inter);
        computapuntnocaiguda(inter);
      }
    }
  }
}
int main() {
  cout.setf(ios::fixed);
  cout.precision(8);
  cin >> n;
  poligon = vector<complex<long double> >(n);
  for (int i = 0; i < n; i++) llegeix(poligon[i]);
  llegeix(a);
  llegeix(v);
  cin >> vz;
  cin >> fdown;
  fdown = -fdown;
  llegeix(u);
  cin >> uz;
  uz = -uz;
  if (abs(v) < error and abs(u) < error)
    hihatminim = false;
  else if (abs(prodvec(v, u)) < error)
    computaminimparalel();
  else
    computaminimnoparalel();
  if (hihatminim)
    cout << tminim.first << " " << tminim.second << endl;
  else
    cout << -1.0 << " " << -1.0 << endl;
}
