import java.awt.geom.*; import java.io.*; import java.util.*; public class Lifeguard { private static final double EPS = 1e-12; private static final Scanner cin = new Scanner(System.in); public static void main(String[] args) { while(true) { DataSet ds = DataSet.scan(cin); if(ds == null) break; System.out.println(ds.solve()); } } private static class DataSet { private Point2D[] pv; private double tg; private double tw; private Point2D ps; private Point2D pt; private DataSet(int n) { this.pv = new Point2D[n]; } private static int compare(double x, double y) { if(x - y > EPS) return +1; if(y - x > EPS) return -1; return 0; } private Point2D entryPoint(Point2D p1, Point2D p2, Point2D p0) { AffineTransform tr; { double dx = p2.getX() - p1.getX(); double dy = p2.getY() - p1.getY(); tr = new AffineTransform(); tr.translate (p1.getX(), p1.getY()); tr.scale (Math.hypot(dx, dy), Math.hypot(dx, dy)); tr.rotate (Math.atan2(dy, dx)); } double qx, qy; try { Point2D q = tr.inverseTransform(p0, null); qx = q.getX(); qy = q.getY(); } catch(Exception e) { throw new RuntimeException(e); } double a = tw / tg; double x = qx - Math.abs(qy) / Math.sqrt(a * a - 1.0); if(compare(x, 0.0) <= 0) return p1; if(compare(x, 1.0) >= 0) return p2; return tr.transform(new Point2D.Double(x, 0.0), null); } private double compute(int j1, int j2, int dir) { int n = pv.length; dir += n; Point2D p1 = entryPoint(pv[(j1 + dir) % n], pv[j1], ps); Point2D p2 = entryPoint(pv[j2], pv[(j2 + dir) % n], pt); double t = 0.0; t += tw * ps.distance(p1); while(j1 != j2) { j1 = (j1 + dir) % n; t += tg * p1.distance(pv[j1]); p1 = pv[j1]; } t += tg * p1.distance(p2); t += tw * p2.distance(pt); return t; } public double solve() { double time = tw * ps.distance(pt); for(int i = 0; i < pv.length; i++) { for(int j = 0; j < pv.length; j++) { time = Math.min(time, compute(i, j, +1)); time = Math.min(time, compute(i, j, -1)); } } return time; } public static DataSet scan(Scanner in) { int n = in.nextInt(); if(n == 0) return null; DataSet ds = new DataSet(n); for(int i = 0; i < n; i++) { ds.pv[i] = new Point2D.Double(in.nextInt(), in.nextInt()); } ds.tg = in.nextDouble(); ds.tw = in.nextDouble(); ds.ps = new Point2D.Double(in.nextInt(), in.nextInt()); ds.pt = new Point2D.Double(in.nextInt(), in.nextInt()); return ds; } } }