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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
struct Point {
  double x, y;
  Point(double x = 0, double y = 0) : x(x), y(y) {}
};
int sgn(double d1, double d2) {
  if (fabs(d1 - d2) <= eps) return 0;
  if (d1 > d2) return 1;
  return -1;
}
int dcmp(double x) {
  if (fabs(x) <= eps) return 0;
  if (x > 0) return 1;
  return -1;
}
Point operator+(Point A, Point B) { return Point(A.x + B.x, A.y + B.y); }
Point operator-(Point A, Point B) { return Point(A.x - B.x, A.y - B.y); }
bool operator==(const Point A, const Point B) {
  return dcmp(A.x - B.x) == 0 && dcmp(A.y - B.y) == 0;
}
double Dot(Point A, Point B) { return A.x * B.x + A.y * B.y; }
double Length(Point A) { return sqrt(Dot(A, A)); }
double Cross(Point A, Point B) { return A.x * B.y - B.x * A.y; }
double DistanceToSegment(Point P, Point A, Point B) {
  if (A == B) {
    return Length(P - A);
  }
  Point v1 = B - A, v2 = P - A, v3 = P - B;
  if (dcmp(Dot(v1, v2)) < 0) {
    return Length(v2);
  } else if (dcmp(Dot(v1, v3)) > 0) {
    return Length(v3);
  }
  return fabs(Cross(v1, v2)) / Length(v1);
}
double dist(double x1, double y1, double x2, double y2, double r) {
  Point o = Point(0, 0), p1 = Point(x1, y1), p2 = Point(x2, y2);
  double d1 = DistanceToSegment(o, p1, p2), d2, d3;
  if (sgn(d1, r) >= 0) {
    return Length(p2 - p1);
  }
  d1 = Length(o - p1), d2 = Length(o - p2), d3 = Length(p1 - p2);
  double theta1 = acos(r / d1), theta2 = acos(r / d2);
  double theta3 = acos((d1 * d1 + d2 * d2 - d3 * d3) / (d1 * d2 * 2.0));
  theta3 = theta3 - theta1 - theta2;
  return d1 * sin(theta1) + d2 * sin(theta2) + r * theta3;
}
int main() {
  double xp, yp, vp;
  double x, y, v, r;
  scanf("%lf%lf%lf%lf%lf%lf%lf", &xp, &yp, &vp, &x, &y, &v, &r);
  double low = 0.0, high = 1e7, ans = 1e7;
  double theta = atan2(yp, xp);
  double R = sqrt(xp * xp + yp * yp);
  double omega = vp / R;
  int i;
  for (i = 0; i < 70; ++i) {
    double mid = 0.5 * (low + high);
    double alpha = omega * mid + theta;
    double tx = R * cos(alpha), ty = R * sin(alpha);
    double d = dist(tx, ty, x, y, r);
    if (sgn(v * mid, d) >= 0) {
      ans = mid;
      high = mid;
    } else {
      low = mid;
    }
  }
  printf("%.9lf\n", ans);
  return 0;
}