#include <bits/stdc++.h>
using namespace std;
const double ep = 1e-8;
const double pi = 3.141592653589793238l;
struct pnt {
  double x, y;
  pnt(double x = 0, double y = 0) : x(x), y(y) {}
  pnt operator+(const pnt &b) { return pnt(x + b.x, y + b.y); }
  pnt operator-(const pnt &b) { return pnt(x - b.x, y - b.y); }
  pnt operator*(const double &b) { return pnt(x * b, y * b); }
  pnt operator/(const double &b) { return pnt(x / b, y / b); }
  double operator&(const pnt &b) { return x * b.x + y * b.y; }
  double operator^(const pnt &b) { return x * b.y - b.x * y; }
  bool operator==(const pnt &b) {
    return abs(x - b.x) < ep && abs(y - b.y) < ep;
  }
  double dist() { return sqrt(x * x + y * y); }
  void input() { scanf("%lf %lf", &x, &y); }
} p[10005], A, V, U, K[2];
double zv, zu, f;
vector<pnt> C;
int inter_line(pnt a, pnt b, pnt c, pnt d, pnt &rlt) {
  double S = a - b ^ c - d;
  double S1 = a - b ^ c - b;
  if (abs(S) < ep) {
    if (abs(S1) < ep)
      return -1;
    else
      return 0;
  }
  double r = S1 / S;
  rlt = d * r + c * (1 - r);
  return 1;
}
bool inside(pnt p, pnt b, pnt c) {
  return abs(p - b ^ p - c) < ep && (p - b & p - c) <= 0;
}
int inter_line_seg(pnt a, pnt b, pnt c, pnt d, pnt &rlt) {
  double s = a - b ^ c - d;
  if (abs(s) < ep) {
    if (abs(b - a ^ c - a) < ep) return 2;
    return -1;
  }
  int k = inter_line(a, b, c, d, rlt);
  assert(k == 1);
  return inside(rlt, c, d);
}
bool on_ray(pnt a, pnt b, pnt p) {
  return abs(p - a ^ b - a) < ep && (b - a & p - a) > -ep;
}
int inter_ray_seg(pnt a, pnt b, pnt c, pnt d, pnt &A, pnt &B) {
  int k = inter_line_seg(a, b, c, d, A);
  if (k == 2) {
    if (on_ray(a, b, c) && on_ray(a, b, d)) {
      A = c, B = d;
      return 2;
    }
    if (on_ray(a, b, c)) {
      A = a, B = c;
      return 2;
    }
    if (on_ray(a, b, d)) {
      A = a, B = d;
      return 2;
    }
    return -2;
  }
  if (k == -1) return -1;
  if (k == 1 && on_ray(a, b, A)) return 1;
  return 0;
}
int in_a_row(pnt a, pnt b, pnt c) {
  double aoc = a ^ c, aob = a ^ b, boc = b ^ c;
  if (abs(aoc) < ep) {
    if (abs(aob) > ep || (a & b) < -ep) return -1;
    return 2;
  }
  if (aoc > 0 && aob > -ep && boc > -ep) return 1;
  if (aoc < 0 && aob < ep && boc < ep) return 1;
  return 0;
}
double T1 = -1, T2 = -1;
void update(double ans1, double ans2) {
  if (T1 == -1)
    T1 = ans1, T2 = ans2;
  else if (T1 < ans1 - ep)
    return;
  else if (T1 > ans1 + ep || T2 > ans2 + ep)
    T1 = ans1, T2 = ans2;
  return;
}
void calc(pnt X) {
  pnt P, Q;
  inter_line(A, K[0], X, X + U, P);
  inter_line(A, K[1], X, X + U, Q);
  double ans1 = P.dist() / V.dist();
  double ans2 = (Q - X).dist() / U.dist() * zu / f;
  update(ans1, ans2);
  return;
}
int n;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) p[i].input();
  A.input();
  V.input();
  scanf("%lf", &zv);
  scanf("%lf", &f);
  f = -f;
  U.input();
  scanf("%lf", &zu);
  zu = -zu;
  K[0] = V;
  K[1] = V + U * zv / zu;
  for (int i = 0; i < n; i++) p[i] = p[i] - A;
  A = pnt(0, 0);
  p[n] = p[0];
  if (!(K[1] == A)) {
    pnt I[2];
    for (int i = 0; i < n; i++) {
      int k = inter_ray_seg(A, A + K[1], p[i], p[i + 1], I[0], I[1]);
      for (int i = 0; i < k; i++) {
        double t = I[i].dist() / K[1].dist();
        update(t, 0);
      }
    }
  }
  if (!(K[0] == A)) {
    pnt I[2];
    for (int i = 0; i < n; i++) {
      int k = inter_ray_seg(A, A + K[0], p[i], p[i + 1], I[0], I[1]);
      for (int j = 0; j < k; j++) {
        double t = I[j].dist() / K[0].dist();
        update(t, t * zv / f);
        if (U == A) update(t, 0);
      }
    }
  }
  if (abs(K[0] ^ K[1]) > ep) {
    pnt X, Y;
    for (int i = 0; i < 2; i++) {
      for (int j = 0; j < n; j++) {
        int k = inter_ray_seg(A, A + K[i], p[j], p[j + 1], X, Y);
        if (k == 1) C.push_back(X);
      }
    }
    for (int j = 0; j < n; j++)
      if (in_a_row(K[0], p[j], K[1]) > 0) C.push_back(p[j]);
    for (auto x : C) calc(x);
  }
  cout << fixed << setprecision(10) << T1 << " " << T2 << endl;
  return 0;
}
