Problem: Brothers Fred and George Weasley once got into the sporting goods store and opened a box of Quidditch balls. After long and painful experiments they found out that the Golden Snitch is not enchanted at all. It is simply a programmed device. It always moves along the same trajectory, which is a polyline with vertices at the points (x0, y0, z0), (x1, y1, z1), ..., (xn, yn, zn). At the beginning of the game the snitch is positioned at the point (x0, y0, z0), and then moves along the polyline at the constant speed vs. The twins have not yet found out how the snitch behaves then. Nevertheless, they hope that the retrieved information will help Harry Potter and his team in the upcoming match against Slytherin. Harry Potter learned that at the beginning the game he will be at the point (Px, Py, Pz) and his super fast Nimbus 2011 broom allows him to move at the constant speed vp in any direction or remain idle. vp is not less than the speed of the snitch vs. Harry Potter, of course, wants to catch the snitch as soon as possible. Or, if catching the snitch while it is moving along the polyline is impossible, he wants to hurry the Weasley brothers with their experiments. Harry Potter catches the snitch at the time when they are at the same point. Help Harry.

Input

The first line contains a single integer n (1 ≤ n ≤ 10000). The following n + 1 lines contain the coordinates xi, yi, zi, separated by single spaces. The coordinates of any two consecutive points do not coincide. The next line contains the velocities vp and vs, the last line contains Px, Py, Pz, separated by single spaces. All the numbers in the input are integers, their absolute value does not exceed 104. The speeds are strictly positive. It is guaranteed that vs ≤ vp.

Output

If Harry Potter can catch the snitch while it is moving along the polyline (including the end (xn, yn, zn)), print "YES" in the first line (without the quotes). Print in the second line t, which is the earliest moment of time, when Harry will be able to catch the snitch. On the third line print three numbers X, Y, Z, the coordinates of the point at which this happens. The absolute or relative error in the answer should not exceed 10 - 6. If Harry is not able to catch the snitch during its moving along the described polyline, print "NO".

Examples

Input

4
0 0 0
0 10 0
10 10 0
10 0 0
0 0 0
1 1
5 5 25


Output

YES
25.5000000000
10.0000000000 4.5000000000 0.0000000000


Input

4
0 0 0
0 10 0
10 10 0
10 0 0
0 0 0
1 1
5 5 50


Output

NO


Input

1
1 2 3
4 5 6
20 10
1 2 3


Output

YES
0.0000000000
1.0000000000 2.0000000000 3.0000000000

Solution (in JAVA):

Solution:
import java.awt.Point;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.math.MathContext;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.Stack;
import java.util.StringTokenizer;
import java.util.TreeSet;

import javax.swing.text.StyledEditorKit.ItalicAction;

import static java.lang.Double.*;
import static java.math.BigInteger.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;

public class Main implements Runnable {
	
	private void solve() throws IOException {
//		long start = System.currentTimeMillis();
		readData();
		processing();
	}
	
	private double timeBefore;
	private double timeAdd;
	
	private void processing() {
		double sumLength = 0.0;
		for (int i = 1; i <= n; ++i) {
			double di = knots[i].distanceTo(knots[i-1]);
			sumLength += di;
			timeAdd = di / speedSnitch;
			if (startHarry.distanceTo(knots[i]) - EPS <= (timeBefore + timeAdd)*speedHarry) {
				double minTime = 0.0;
				double maxTime = timeAdd;
				for (int iterations = 0; iterations < 48; ++iterations) {
					double middle = (minTime + maxTime) / 2.0;
					if (check(middle, i)) {
						maxTime = middle;
					}
					else {
						minTime = middle;
					}
				}
				double middle = (minTime + maxTime) / 2.0;
				println(YES);
				writer.printf("%.6f\n", middle+timeBefore);
				writer.printf("%.6f %.6f %.6f\n", to.x, to.y, to.z);
				return;
			}
			timeBefore = sumLength / speedSnitch;
		}
		println(NO);
	}
	
	private Point3D to = new Point3D();
	
	private boolean check(double checkTime, int index) {
		double dx = knots[index].x - knots[index-1].x;
		double dy = knots[index].y - knots[index-1].y;
		double dz = knots[index].z - knots[index-1].z;
		double kf = checkTime/timeAdd;
		to.set(knots[index-1], dx*kf, dy*kf, dz*kf);
		return to.distanceTo(startHarry) - EPS <= (checkTime+timeBefore)*speedHarry;
	}
	
	private void readData() throws IOException {
		n = nextInt();
		knots = new Point3D[n+1];
		for (int i = 0; i <= n; ++i) {
			knots[i] = new Point3D(true);
		}
		speedHarry = nextDouble();
		speedSnitch = nextDouble();
		startHarry = new Point3D(true);
	}	
	
	private int n;
	
	private Point3D[] knots;
	
	private double speedHarry;
	private double speedSnitch;
	
	private Point3D startHarry;
	
	private static final String YES = "YES";
	private static final String NO = "NO";
	private static final double EPS = 1e-9;
	
	private class Point3D {
		
		public Point3D() {
		}
		
		public Point3D(boolean fromInput) throws IOException {
			this.x = nextDouble();
			this.y = nextDouble();
			this.z = nextDouble();
		}
		
		public double distanceTo(Point3D p) {
			return sqrt((p.x - x)*(p.x - x) + (p.y - y)*(p.y - y) + (p.z - z)*(p.z - z));
		}
		
		public void set(Point3D p, double shiftX, double shiftY, double shiftZ) {
			this.x = p.x + shiftX;
			this.y = p.y + shiftY;
			this.z = p.z + shiftZ;
		}
		
		public void print() {
			System.err.println(x + " " + y + " " + z);
		}
		
		public double x;
		public double y;
		public double z;
	}
	
	public static void main(String[] args) throws InterruptedException {
		new Thread(null, new Runnable() {
			public void run() {
				new Main().run();
			}
		}, "1", 1 << 24).start();
	}

	// @Override
	public void run() {
		try {
			boolean onlineJudge = System.getProperty("ONLINE_JUDGE") != null;
			reader = onlineJudge ? new BufferedReader(new InputStreamReader(
					System.in)) : new BufferedReader(
					new FileReader("input.txt"));
			writer = onlineJudge ? new PrintWriter(new BufferedWriter(
					new OutputStreamWriter(System.out))) : new PrintWriter(
					new BufferedWriter(new FileWriter("output.txt")));
			Locale.setDefault(Locale.US);
			tokenizer = null;
			solve();
			writer.flush();
		} catch (Exception error) {
			error.printStackTrace();
			System.exit(1);
		}
	}

	private BufferedReader reader;
	private PrintWriter writer;
	private StringTokenizer tokenizer;

	private void println() {
		writer.println();
	}
	
	private void print(long value) {
		writer.print(value);
	}
	
	private void println(long value) {
		writer.println(value);
	}
	
	private void print(char ch) {
		writer.print(ch);
	}

	private void println(String s) {
		writer.println(s);
	}

	private void print(String s) {
		writer.print(s);
	}
	
	private void print(int value) {
		writer.print(value);
	}
	
	private void println(int value) {
		writer.println(value);
	}

	private void printf(String f, double d) {
		writer.printf(f, d);
	}

	private int nextInt() throws IOException {
		return Integer.parseInt(nextToken());
	}

	private long nextLong() throws IOException {
		return Long.parseLong(nextToken());
	}

	private double nextDouble() throws IOException {
		return Double.parseDouble(nextToken());
	}

	private String nextToken() throws IOException {
		while (tokenizer == null || !tokenizer.hasMoreTokens()) {
			tokenizer = new StringTokenizer(reader.readLine());
		}
		return tokenizer.nextToken();
	}
}