Problem: Qwerty the Ranger arrived to the Diatar system with a very important task. He should deliver a special carcinogen for scientific research to planet Persephone. This is urgent, so Qwerty has to get to the planet as soon as possible. A lost day may fail negotiations as nobody is going to pay for an overdue carcinogen.

You can consider Qwerty's ship, the planet Persephone and the star Diatar points on a plane. Diatar is located in the origin of coordinate axes — at point (0, 0). Persephone goes round Diatar along a circular orbit with radius R in the counter-clockwise direction at constant linear speed vp (thus, for instance, a full circle around the star takes <image> of time). At the initial moment of time Persephone is located at point (xp, yp).

At the initial moment of time Qwerty's ship is at point (x, y). Qwerty can move in any direction at speed of at most v (v > vp). The star Diatar is hot (as all stars), so Qwerty can't get too close to it. The ship's metal sheathing melts at distance r (r < R) from the star.

Find the minimum time Qwerty needs to get the carcinogen to planet Persephone.

Input

The first line contains space-separated integers xp, yp and vp ( - 104 ≤ xp, yp ≤ 104, 1 ≤ vp < 104) — Persephone's initial position and the speed at which it goes round Diatar.

The second line contains space-separated integers x, y, v and r ( - 104 ≤ x, y ≤ 104, 1 < v ≤ 104, 1 ≤ r ≤ 104) — The intial position of Qwerty's ship, its maximum speed and the minimum safe distance to star Diatar.

It is guaranteed that r2 < x2 + y2, r2 < xp2 + yp2 and vp < v.

Output

Print a single real number — the minimum possible delivery time. The answer will be considered valid if its absolute or relative error does not exceed 10 - 6.

Examples

Input

10 0 1
-10 0 2 8


Output

9.584544103

Input

50 60 10
50 60 20 40


Output

0.000000000

Solution (in JAVA):

Solution:

import java.math.*;
import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		InputReader in = new InputReader(inputStream);
		OutputWriter out = new OutputWriter(outputStream);
		Task solver = new Task();
		solver.solve(1, in, out);
		out.close();
	}
}

class Task {
	private static final double eps = 1e-12;
	private double dist(double x1, double y1, double x2, double y2) {
		return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
	}
	private double scalar(double x1, double y1, double x2, double y2) {
		return x1 * x2 + y1 * y2;
	}
	private boolean check(double x1, double y1, double x2, double y2, double r) {
		if (Geometry.sign(x1 - x2, eps) == 0 && Geometry.sign(y1 - y2, eps) == 0) return false;
		double vx = x2 - x1, vy = y2 - y1;
		double lambda = -scalar(x1, y1, vx, vy) / scalar(vx, vy, vx, vy);
		double _x = x1 + lambda * vx, _y = y1 + lambda * vy;
		if (Geometry.sign(dist(_x, _y, 0, 0) - r) < 0)
			if (Geometry.sign(lambda, eps) >= 0 && Geometry.sign(lambda - 1, eps) <= 0) return true;
		return false;
	}
	private double degree(double a, double b) {
		double tmp = Math.abs(a - b);
		while (tmp > Math.PI * 2) tmp -= Math.PI * 2;
		return Math.min(tmp, 2 * Math.PI - tmp);
	}
	private double calc(double x1, double y1, double x2, double y2, double r) {
		if (! check(x1, y1, x2, y2, r)) {
			return dist(x1, y1, x2, y2);
		} else {
			double a = Math.acos(r / dist(x1, y1, 0, 0));
			double b = Math.acos(r / dist(x2, y2, 0, 0));
			double p1 = Math.atan2(y1, x1) - a;
			double p2 = Math.atan2(y1, x1) + a;
			double q1 = Math.atan2(y2, x2) - b;
			double q2 = Math.atan2(y2, x2) + b;
			double res = degree(p1, q1);
			res = Math.min(res, degree(p2, q1));
			res = Math.min(res, degree(p1, q2));
			res = Math.min(res, degree(p2, q2));
			return res * r + Math.sqrt(x1 * x1 + y1 * y1 - r * r) + Math.sqrt(x2 * x2 + y2 * y2 - r * r);
		}
	}
	public void solve(int testNumber, InputReader in, OutputWriter out) {
		double x0 = in.readDouble();
		double y0 = in.readDouble();
		double v0 = in.readDouble();
		double R = Math.sqrt(x0 * x0 + y0 * y0);
		double x = in.readDouble();
		double y = in.readDouble();
		double v = in.readDouble();
		double r = in.readDouble();
		double head = 0, tail = 1e10;
		while (head + 1e-10 < tail) {
			double mid = (head + tail) / 2;
			double x1 = x0 * Math.cos(v0 / R * mid) - y0 * Math.sin(v0 / R * mid);
			double y1 = x0 * Math.sin(v0 / R * mid) + y0 * Math.cos(v0 / R * mid);
			if (Geometry.sign(calc(x, y, x1, y1, r) / v - mid, eps) < 0) tail = mid; else head = mid;
		}
		out.printLineDouble(head, 9);
	}
}

class Geometry {
	public static int sign(double x, double eps) {
		if (Math.abs(x) < eps) return 0;
		return (x > 0) ? 1 : -1;
	}
	public static int sign(double x) {
		return sign(x, 1e-8);
	}

	}

class InputReader {
	private InputStream stream;
	private byte[] buf = new byte[1000];
	private int curChar;
	private int numChars;

	public InputReader(InputStream stream) {
		this.stream = stream;
	}

	private int read() {
		if (numChars == -1)
			throw new InputMismatchException();
		if (curChar >= numChars) {
			curChar = 0;
			try {
				numChars = stream.read(buf);
			} catch (IOException e) {
				throw new InputMismatchException();
			}
			if (numChars <= 0)
				return -1;
		}
		return buf[curChar++];
	}

	public double readDouble() {
		int c = read();
		while (isSpaceChar(c))
			c = read();
		int sgn = 1;
		if (c == '-') {
			sgn = -1;
			c = read();
		}
		double res = 0;
		while (!isSpaceChar(c) && c != '.') {
			if (c < '0' || c > '9')
				throw new InputMismatchException();
			res *= 10;
			res += c - '0';
			c = read();
		}
		if (c == '.') {
			c = read();
			double m = 1;
			while (!isSpaceChar(c)) {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				m /= 10;
				res += (c - '0') * m;
				c = read();
			}
		}
		return res * sgn;
	}

	private boolean isSpaceChar(int c) {
		return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
	}
}

class OutputWriter {
	private final PrintWriter writer;

	public OutputWriter(OutputStream outputStream) {
		writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
	}

	public OutputWriter(Writer writer) {
		this.writer = new PrintWriter(writer);
	}

	public void print(Object...objects) {
		for (int i = 0; i < objects.length; i++) {
			if (i != 0)
				writer.print(' ');
			writer.print(objects[i]);
		}
	}

	public void printDouble(double x, int precision) {
		writer.printf("%." + precision + "f", x);
	}

	public void printLineDouble(double x, int precision) {
		printDouble(x, precision);
		printLine();
	}

	public void printLine(Object...objects) {
		print(objects);
		writer.println();
	}

	public void close() {
		writer.close();
	}
}